@propelinc/citrus-ui 0.6.0 → 1.0.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 (355) hide show
  1. package/README.md +54 -60
  2. package/dist/colors/colors.d.ts +31 -0
  3. package/dist/colors/theme.d.ts +2 -11
  4. package/dist/colors/util-classes.d.ts +11 -0
  5. package/dist/components/CAccordion.vue.d.ts +21 -0
  6. package/dist/components/CAccordionItem.vue.d.ts +41 -0
  7. package/dist/components/CAppBar.vue.d.ts +156 -0
  8. package/dist/components/CBadge.vue.d.ts +52 -0
  9. package/dist/components/CBottomSheet.vue.d.ts +226 -0
  10. package/dist/components/CButton/CButton.vue.d.ts +231 -0
  11. package/dist/components/CButton/types.d.ts +5 -0
  12. package/dist/components/CButtonStack.vue.d.ts +24 -0
  13. package/dist/components/CCard.vue.d.ts +107 -0
  14. package/dist/components/CCardFooter.vue.d.ts +26 -0
  15. package/dist/components/CCardHeader.vue.d.ts +3 -0
  16. package/dist/components/CCardSection.vue.d.ts +17 -0
  17. package/dist/components/CCheckbox.vue.d.ts +145 -0
  18. package/dist/components/CCol.vue.d.ts +21 -0
  19. package/dist/components/CDivider.vue.d.ts +17 -0
  20. package/dist/components/CDobField.vue.d.ts +2109 -0
  21. package/dist/components/CDobSelect.vue.d.ts +398 -0
  22. package/dist/components/CEmailField.vue.d.ts +699 -0
  23. package/dist/components/CExpandTransition.vue.d.ts +19 -0
  24. package/dist/components/CFadeTransition.vue.d.ts +3 -0
  25. package/dist/components/CFileInput.vue.d.ts +98 -0
  26. package/dist/components/CFixedPageFooter.vue.d.ts +106 -0
  27. package/dist/components/CForm.vue.d.ts +29 -0
  28. package/dist/components/CFormFieldCounter.vue.d.ts +42 -0
  29. package/dist/components/CIconButton.vue.d.ts +390 -0
  30. package/dist/components/CLabel.vue.d.ts +32 -0
  31. package/dist/components/CListItem.vue.d.ts +208 -0
  32. package/dist/components/CListItemContent.vue.d.ts +27 -0
  33. package/dist/components/CListItemIcon.vue.d.ts +54 -0
  34. package/dist/components/CLoader.vue.d.ts +73 -0
  35. package/dist/components/CLogo.vue.d.ts +19 -0
  36. package/dist/components/CMaskedTextField.vue.d.ts +2012 -0
  37. package/dist/components/CMenu.vue.d.ts +6 -0
  38. package/dist/components/CMenuItem.vue.d.ts +170 -0
  39. package/dist/components/CMenuLabel.vue.d.ts +3 -0
  40. package/dist/components/CModal.vue.d.ts +206 -0
  41. package/dist/components/CModalLoading.vue.d.ts +230 -0
  42. package/dist/components/CNotification.vue.d.ts +589 -0
  43. package/dist/components/CPhoneField.vue.d.ts +2088 -0
  44. package/dist/components/CPill.vue.d.ts +42 -0
  45. package/dist/components/CPillGroup.vue.d.ts +70 -0
  46. package/dist/components/CPopup.vue.d.ts +21 -0
  47. package/dist/components/CProgressLinear.vue.d.ts +61 -0
  48. package/dist/components/CProgressRing.vue.d.ts +103 -0
  49. package/dist/components/CRadio.vue.d.ts +73 -0
  50. package/dist/components/CRadioGroup.vue.d.ts +123 -0
  51. package/dist/components/CRebrand.vue.d.ts +28 -0
  52. package/dist/components/CRow.vue.d.ts +67 -0
  53. package/dist/components/CSafeArea.vue.d.ts +18 -0
  54. package/dist/components/CSectionHeader.vue.d.ts +28 -0
  55. package/dist/components/CSelect.vue.d.ts +293 -0
  56. package/dist/components/CSkeleton.vue.d.ts +3 -0
  57. package/dist/components/CSkeletonLoaderCard.vue.d.ts +21 -0
  58. package/dist/components/CSkeletonLoaderCircle.vue.d.ts +5 -0
  59. package/dist/components/CSkeletonLoaderText.vue.d.ts +44 -0
  60. package/dist/components/CSlideFadeTransition.vue.d.ts +58 -0
  61. package/dist/components/CSplitInput.vue.d.ts +2131 -0
  62. package/dist/components/CSquaredIcon.vue.d.ts +47 -0
  63. package/dist/components/CSsnField.vue.d.ts +2083 -0
  64. package/dist/components/CStatusDot.vue.d.ts +27 -0
  65. package/dist/components/CSwitch.vue.d.ts +54 -0
  66. package/dist/components/CSwitchListItem.vue.d.ts +392 -0
  67. package/dist/components/CTextArea.vue.d.ts +240 -0
  68. package/dist/components/CTextField.vue.d.ts +647 -0
  69. package/dist/components/CTextLink.vue.d.ts +55 -0
  70. package/dist/components/CThirdPartyLogo.vue.d.ts +128 -0
  71. package/dist/components/CTimeago.vue.d.ts +12 -0
  72. package/dist/components/CToast.vue.d.ts +458 -0
  73. package/dist/components/CToastsList.vue.d.ts +430 -0
  74. package/dist/components/CValidationMessage.vue.d.ts +45 -0
  75. package/dist/components/CZipcodeField.vue.d.ts +2080 -0
  76. package/dist/components/index.d.ts +66 -25
  77. package/dist/components/internal/CCloseButton.vue.d.ts +14 -0
  78. package/dist/composables/accessibility.d.ts +1 -0
  79. package/dist/composables/animation.d.ts +12 -0
  80. package/dist/composables/binding.d.ts +19 -0
  81. package/dist/composables/colors.d.ts +13 -0
  82. package/dist/composables/elements.d.ts +3 -0
  83. package/dist/composables/fields.d.ts +9 -0
  84. package/dist/composables/gestures.d.ts +53 -0
  85. package/dist/composables/i18n.d.ts +3 -0
  86. package/dist/composables/id.d.ts +11 -0
  87. package/dist/composables/input-mask.d.ts +18 -0
  88. package/dist/composables/router.d.ts +30 -0
  89. package/dist/composables/slots.d.ts +2 -0
  90. package/dist/composables/toast.d.ts +21 -0
  91. package/dist/composables/validations.d.ts +77 -0
  92. package/dist/index.css +1 -0
  93. package/dist/index.d.ts +5 -4
  94. package/dist/index.mjs +11738 -0
  95. package/dist/index.mjs.map +1 -0
  96. package/dist/plugin.d.ts +2 -2
  97. package/dist/services/animation.d.ts +17 -0
  98. package/dist/services/directives/index.d.ts +2 -0
  99. package/dist/services/directives/scroll-into-view.d.ts +7 -0
  100. package/dist/services/directives/tap-animation.d.ts +6 -0
  101. package/dist/services/id.d.ts +22 -0
  102. package/dist/services/injections/accordions.d.ts +3 -0
  103. package/dist/services/injections/animations.d.ts +2 -0
  104. package/dist/services/injections/buttons.d.ts +4 -0
  105. package/dist/services/injections/forms.d.ts +6 -0
  106. package/dist/services/injections/icon-buttons.d.ts +3 -0
  107. package/dist/services/injections/pills.d.ts +4 -0
  108. package/dist/services/injections/radio.d.ts +10 -0
  109. package/dist/styles/main.css +3002 -0
  110. package/dist/styles/utils.css +2319 -0
  111. package/dist/theme/icons.d.ts +35 -2
  112. package/dist/types/CForm.d.ts +12 -0
  113. package/dist/types/font-awesome.d.ts +5 -0
  114. package/dist/types.d.ts +12 -0
  115. package/index.ts +2 -0
  116. package/package.json +60 -45
  117. package/src/assets/fonts/grenette-regular.woff2 +0 -0
  118. package/src/assets/fonts/grenette-semibold.woff2 +0 -0
  119. package/src/assets/fonts/polymath.woff2 +0 -0
  120. package/src/assets/logos/propel/icon.svg +15 -0
  121. package/src/assets/logos/propel/lockup.svg +11 -0
  122. package/src/colors/colors.ts +173 -0
  123. package/src/colors/theme.ts +8 -14
  124. package/src/colors/util-classes.ts +49 -0
  125. package/src/componentResolver.js +33 -0
  126. package/src/components/CAccordion.vue +32 -7
  127. package/src/components/CAccordionItem.vue +109 -36
  128. package/src/components/CAppBar.vue +237 -0
  129. package/src/components/CBadge.vue +74 -0
  130. package/src/components/CBottomSheet.vue +430 -0
  131. package/src/components/CButton/CButton.vue +347 -0
  132. package/src/components/CButton/types.ts +5 -0
  133. package/src/components/CButtonStack.vue +36 -0
  134. package/src/components/CCard.vue +149 -41
  135. package/src/components/CCardFooter.vue +11 -27
  136. package/src/components/CCardHeader.vue +30 -21
  137. package/src/components/CCardSection.vue +23 -12
  138. package/src/components/CCheckbox.vue +191 -21
  139. package/src/components/CCol.vue +55 -0
  140. package/src/components/CDivider.vue +46 -0
  141. package/src/components/CDobField.vue +153 -0
  142. package/src/components/CDobSelect.vue +274 -0
  143. package/src/components/CEmailField.vue +61 -0
  144. package/src/components/CExpandTransition.vue +55 -0
  145. package/src/components/CFadeTransition.vue +23 -0
  146. package/src/components/CFileInput.vue +186 -0
  147. package/src/components/CFixedPageFooter.vue +76 -0
  148. package/src/components/CForm.vue +86 -0
  149. package/src/components/CFormFieldCounter.vue +40 -0
  150. package/src/components/CIconButton.vue +175 -59
  151. package/src/components/CLabel.vue +52 -0
  152. package/src/components/CListItem.vue +149 -45
  153. package/src/components/CListItemContent.vue +60 -0
  154. package/src/components/CListItemIcon.vue +27 -31
  155. package/src/components/CLoader.vue +156 -0
  156. package/src/components/CLogo.vue +23 -0
  157. package/src/components/CMaskedTextField.vue +118 -0
  158. package/src/components/CMenu.vue +24 -0
  159. package/src/components/CMenuItem.vue +106 -0
  160. package/src/components/CMenuLabel.vue +26 -0
  161. package/src/components/CModal.vue +198 -79
  162. package/src/components/CModalLoading.vue +27 -9
  163. package/src/components/CNotification.vue +86 -53
  164. package/src/components/CPhoneField.vue +69 -0
  165. package/src/components/CPill.vue +162 -0
  166. package/src/components/CPillGroup.vue +73 -0
  167. package/src/components/CPopup.vue +66 -0
  168. package/src/components/CProgressLinear.vue +52 -0
  169. package/src/components/CProgressRing.vue +126 -0
  170. package/src/components/CRadio.vue +138 -0
  171. package/src/components/CRadioGroup.vue +142 -0
  172. package/src/components/CRebrand.vue +28 -0
  173. package/src/components/CRow.vue +62 -0
  174. package/src/components/CSafeArea.vue +23 -0
  175. package/src/components/CSectionHeader.vue +50 -0
  176. package/src/components/CSelect.vue +223 -74
  177. package/src/components/CSkeleton.vue +65 -0
  178. package/src/components/CSkeletonLoaderCard.vue +29 -0
  179. package/src/components/CSkeletonLoaderCircle.vue +18 -14
  180. package/src/components/CSkeletonLoaderText.vue +127 -17
  181. package/src/components/CSlideFadeTransition.vue +100 -0
  182. package/src/components/CSplitInput.vue +111 -0
  183. package/src/components/CSquaredIcon.vue +83 -0
  184. package/src/components/CSsnField.vue +86 -0
  185. package/src/components/CStatusDot.vue +70 -0
  186. package/src/components/CSwitch.vue +125 -0
  187. package/src/components/CSwitchListItem.vue +110 -0
  188. package/src/components/CTextArea.vue +193 -47
  189. package/src/components/CTextField.vue +450 -93
  190. package/src/components/CTextLink.vue +48 -38
  191. package/src/components/CThirdPartyLogo.vue +127 -0
  192. package/src/components/CTimeago.vue +63 -0
  193. package/src/components/CToast.vue +259 -0
  194. package/src/components/CToastsList.vue +32 -0
  195. package/src/components/CValidationMessage.vue +70 -0
  196. package/src/components/CZipcodeField.vue +69 -0
  197. package/src/components/index.ts +66 -25
  198. package/src/components/internal/CCloseButton.vue +57 -0
  199. package/src/composables/accessibility.ts +29 -0
  200. package/src/composables/animation.ts +95 -0
  201. package/src/composables/binding.ts +34 -0
  202. package/src/composables/colors.ts +59 -0
  203. package/src/composables/elements.ts +72 -0
  204. package/src/composables/fields.ts +19 -0
  205. package/src/composables/gestures.ts +197 -0
  206. package/src/composables/i18n.ts +13 -0
  207. package/src/composables/id.ts +23 -0
  208. package/src/composables/input-mask.ts +139 -0
  209. package/src/composables/router.ts +64 -0
  210. package/src/composables/slots.ts +57 -0
  211. package/src/composables/toast.ts +64 -0
  212. package/src/composables/validations.ts +214 -0
  213. package/src/index.ts +7 -7
  214. package/src/plugin.ts +13 -6
  215. package/src/services/animation.ts +101 -0
  216. package/src/services/directives/index.ts +2 -0
  217. package/src/services/directives/scroll-into-view.ts +86 -0
  218. package/src/services/directives/tap-animation.ts +71 -0
  219. package/src/services/id.ts +31 -0
  220. package/src/services/injections/accordions.ts +4 -0
  221. package/src/services/injections/animations.ts +3 -0
  222. package/src/services/injections/buttons.ts +5 -0
  223. package/src/services/injections/forms.ts +8 -0
  224. package/src/services/injections/icon-buttons.ts +4 -0
  225. package/src/services/injections/pills.ts +7 -0
  226. package/src/services/injections/radio.ts +12 -0
  227. package/src/shims-vue.d.ts +6 -3
  228. package/src/styles/_animation.scss +19 -0
  229. package/src/styles/_button.scss +61 -0
  230. package/src/styles/_colors.scss +58 -11
  231. package/src/styles/_core.scss +248 -87
  232. package/src/styles/_form-fields.scss +68 -15
  233. package/src/styles/_grenette.scss +13 -0
  234. package/src/styles/_polymath.scss +14 -0
  235. package/src/styles/_reset.scss +105 -0
  236. package/src/styles/_shoelace.scss +46 -0
  237. package/src/styles/_typography.scss +40 -10
  238. package/src/styles/main.scss +6 -3
  239. package/src/styles/utils/a11y.scss +18 -0
  240. package/src/styles/utils/typography.scss +13 -0
  241. package/src/styles/utils.scss +560 -0
  242. package/src/styles/variables.scss +27 -15
  243. package/src/theme/icons.ts +16 -5
  244. package/src/types/CForm.ts +15 -0
  245. package/src/types/font-awesome.ts +6 -0
  246. package/src/types.ts +15 -0
  247. package/.browserslistrc +0 -3
  248. package/.eslintrc.js +0 -4
  249. package/.stylelintrc.js +0 -3
  250. package/babel.config.js +0 -3
  251. package/dist/citrus-ui.common.js +0 -43434
  252. package/dist/citrus-ui.common.js.map +0 -1
  253. package/dist/citrus-ui.css +0 -1
  254. package/dist/citrus-ui.umd.js +0 -43444
  255. package/dist/citrus-ui.umd.js.map +0 -1
  256. package/dist/citrus-ui.umd.min.js +0 -27
  257. package/dist/citrus-ui.umd.min.js.map +0 -1
  258. package/dist/demo.html +0 -10
  259. package/dist/fonts/Blitz-Script.85ed9abe.woff2 +0 -0
  260. package/dist/fonts/ObjectSans-Bold.5492f3d5.woff2 +0 -0
  261. package/dist/fonts/ObjectSans-BoldSlanted.29e2a87e.woff2 +0 -0
  262. package/dist/fonts/ObjectSans-Heavy.d0b2f035.woff2 +0 -0
  263. package/dist/fonts/ObjectSans-HeavySlanted.45e9c063.woff2 +0 -0
  264. package/dist/fonts/ObjectSans-Light.f885dec3.woff2 +0 -0
  265. package/dist/fonts/ObjectSans-LightSlanted.b8eb7c12.woff2 +0 -0
  266. package/dist/fonts/ObjectSans-Regular.e4ea0b90.woff2 +0 -0
  267. package/dist/fonts/ObjectSans-Slanted.57a90be9.woff2 +0 -0
  268. package/dist/fonts/ObjectSans-Thin.86d44227.woff2 +0 -0
  269. package/dist/fonts/ObjectSans-ThinSlanted.20342160.woff2 +0 -0
  270. package/jest.config.js +0 -9
  271. package/plopfile.js +0 -67
  272. package/project.json +0 -69
  273. package/src/assets/fonts/Blitz-Script.woff2 +0 -0
  274. package/src/assets/fonts/ObjectSans-Bold.woff2 +0 -0
  275. package/src/assets/fonts/ObjectSans-BoldSlanted.woff2 +0 -0
  276. package/src/assets/fonts/ObjectSans-Heavy.woff2 +0 -0
  277. package/src/assets/fonts/ObjectSans-HeavySlanted.woff2 +0 -0
  278. package/src/assets/fonts/ObjectSans-Light.woff2 +0 -0
  279. package/src/assets/fonts/ObjectSans-LightSlanted.woff2 +0 -0
  280. package/src/assets/fonts/ObjectSans-Regular.woff2 +0 -0
  281. package/src/assets/fonts/ObjectSans-Slanted.woff2 +0 -0
  282. package/src/assets/fonts/ObjectSans-Thin.woff2 +0 -0
  283. package/src/assets/fonts/ObjectSans-ThinSlanted.woff2 +0 -0
  284. package/src/components/CAlert.vue +0 -78
  285. package/src/components/CBanner.vue +0 -47
  286. package/src/components/CButton.vue +0 -146
  287. package/src/components/CListItemAction.vue +0 -29
  288. package/src/components/CSegmentedButton.vue +0 -47
  289. package/src/components/CSegmentedButtonOption.vue +0 -42
  290. package/src/components/helpers/FormField.vue +0 -48
  291. package/src/components/helpers/SelectInput.vue +0 -115
  292. package/src/shims-scss.d.ts +0 -4
  293. package/src/shims-vuetify.d.ts +0 -4
  294. package/src/styles/_blitz.scss +0 -8
  295. package/src/styles/_object-sans.scss +0 -23
  296. package/storybook-static/0.799c368cbe88266827ba.manager.bundle.js +0 -1
  297. package/storybook-static/0.a9f0a9ad.iframe.bundle.js +0 -3
  298. package/storybook-static/0.a9f0a9ad.iframe.bundle.js.LICENSE.txt +0 -8
  299. package/storybook-static/0.a9f0a9ad.iframe.bundle.js.map +0 -1
  300. package/storybook-static/1.0438fd8d.iframe.bundle.js +0 -3
  301. package/storybook-static/1.0438fd8d.iframe.bundle.js.LICENSE.txt +0 -17
  302. package/storybook-static/1.0438fd8d.iframe.bundle.js.map +0 -1
  303. package/storybook-static/1.9ebd2fb519f6726108de.manager.bundle.js +0 -1
  304. package/storybook-static/10.348d8814.iframe.bundle.js +0 -3
  305. package/storybook-static/10.348d8814.iframe.bundle.js.LICENSE.txt +0 -30
  306. package/storybook-static/10.348d8814.iframe.bundle.js.map +0 -1
  307. package/storybook-static/10.a85ea1a67689be8e19ff.manager.bundle.js +0 -1
  308. package/storybook-static/11.f4e922583ae35da460f3.manager.bundle.js +0 -2
  309. package/storybook-static/11.f4e922583ae35da460f3.manager.bundle.js.LICENSE.txt +0 -12
  310. package/storybook-static/12.1415460941f0bdcb8fa8.manager.bundle.js +0 -1
  311. package/storybook-static/2.75a17459.iframe.bundle.js +0 -3
  312. package/storybook-static/2.75a17459.iframe.bundle.js.LICENSE.txt +0 -26
  313. package/storybook-static/2.75a17459.iframe.bundle.js.map +0 -1
  314. package/storybook-static/5.f459d151315e6780c20f.manager.bundle.js +0 -2
  315. package/storybook-static/5.f459d151315e6780c20f.manager.bundle.js.LICENSE.txt +0 -8
  316. package/storybook-static/6.3bd64d820f3745f262ff.manager.bundle.js +0 -1
  317. package/storybook-static/6.ce8d99b4.iframe.bundle.js +0 -1
  318. package/storybook-static/7.3d04765dbf3f1dcd706c.manager.bundle.js +0 -1
  319. package/storybook-static/7.6633a922.iframe.bundle.js +0 -3
  320. package/storybook-static/7.6633a922.iframe.bundle.js.LICENSE.txt +0 -12
  321. package/storybook-static/7.6633a922.iframe.bundle.js.map +0 -1
  322. package/storybook-static/8.b541eadfcb9164835dfc.manager.bundle.js +0 -1
  323. package/storybook-static/8.fc5e1ebf.iframe.bundle.js +0 -1
  324. package/storybook-static/9.411ac8e451bbb10926c7.manager.bundle.js +0 -1
  325. package/storybook-static/9.724ac3ed.iframe.bundle.js +0 -3
  326. package/storybook-static/9.724ac3ed.iframe.bundle.js.LICENSE.txt +0 -15
  327. package/storybook-static/9.724ac3ed.iframe.bundle.js.map +0 -1
  328. package/storybook-static/css/main.95216119.css +0 -1
  329. package/storybook-static/css/vendors~main.02dc89bf.css +0 -1
  330. package/storybook-static/favicon.ico +0 -0
  331. package/storybook-static/fonts/Blitz-Script.85ed9abe.woff2 +0 -0
  332. package/storybook-static/fonts/ObjectSans-Bold.5492f3d5.woff2 +0 -0
  333. package/storybook-static/fonts/ObjectSans-BoldSlanted.29e2a87e.woff2 +0 -0
  334. package/storybook-static/fonts/ObjectSans-Heavy.d0b2f035.woff2 +0 -0
  335. package/storybook-static/fonts/ObjectSans-HeavySlanted.45e9c063.woff2 +0 -0
  336. package/storybook-static/fonts/ObjectSans-Light.f885dec3.woff2 +0 -0
  337. package/storybook-static/fonts/ObjectSans-LightSlanted.b8eb7c12.woff2 +0 -0
  338. package/storybook-static/fonts/ObjectSans-Regular.e4ea0b90.woff2 +0 -0
  339. package/storybook-static/fonts/ObjectSans-Slanted.57a90be9.woff2 +0 -0
  340. package/storybook-static/fonts/ObjectSans-Thin.86d44227.woff2 +0 -0
  341. package/storybook-static/fonts/ObjectSans-ThinSlanted.20342160.woff2 +0 -0
  342. package/storybook-static/iframe.html +0 -348
  343. package/storybook-static/index.html +0 -51
  344. package/storybook-static/main.7b4aec9c4352d4bb535b.manager.bundle.js +0 -1
  345. package/storybook-static/main.9e8c64c7.iframe.bundle.js +0 -1
  346. package/storybook-static/runtime~main.91a0c7330ab317d35c4a.manager.bundle.js +0 -1
  347. package/storybook-static/runtime~main.e4da100f.iframe.bundle.js +0 -1
  348. package/storybook-static/vendors~main.6660eda6.iframe.bundle.js +0 -7
  349. package/storybook-static/vendors~main.6660eda6.iframe.bundle.js.LICENSE.txt +0 -80
  350. package/storybook-static/vendors~main.6660eda6.iframe.bundle.js.map +0 -1
  351. package/storybook-static/vendors~main.f7f16cebbf3aa96a4f89.manager.bundle.js +0 -2
  352. package/storybook-static/vendors~main.f7f16cebbf3aa96a4f89.manager.bundle.js.LICENSE.txt +0 -110
  353. package/tsconfig.dist.json +0 -7
  354. package/tsconfig.json +0 -24
  355. package/vue.config.js +0 -5
package/dist/demo.html DELETED
@@ -1,10 +0,0 @@
1
- <meta charset="utf-8">
2
- <title>citrus-ui demo</title>
3
- <script src="./citrus-ui.umd.js"></script>
4
-
5
- <link rel="stylesheet" href="./citrus-ui.css">
6
-
7
-
8
- <script>
9
- console.log(citrus-ui)
10
- </script>
package/jest.config.js DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
3
- setupFilesAfterEnv: ['<rootDir>/tests/unit/helpers/custom-matchers.ts'],
4
-
5
- transformIgnorePatterns: ['<rootDir>/node_modules/(?!vuetify/lib)'],
6
- moduleNameMapper: {
7
- '^.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
8
- },
9
- };
package/plopfile.js DELETED
@@ -1,67 +0,0 @@
1
- function createComponentPath(path, name) {
2
- if (path === '/' || path === '') {
3
- return `${name}`;
4
- }
5
-
6
- const normalizedPath = path.toLowerCase().trim();
7
- if (!normalizedPath.endsWith('/')) {
8
- return `${normalizedPath}/${name}`;
9
- } else {
10
- return `${normalizedPath}${name}`;
11
- }
12
- }
13
-
14
- module.exports = function (plop) {
15
- plop.setHelper('createComponentPath', createComponentPath);
16
-
17
- plop.setGenerator('component', {
18
- description: 'Add a component in the @/component folder',
19
- prompts: [
20
- {
21
- type: 'input',
22
- name: 'name',
23
- message: 'Component name (e.g. PullToRefresh):',
24
- },
25
- {
26
- type: 'input',
27
- name: 'path',
28
- message: 'Path (relative to @/components):',
29
- default: '/',
30
- },
31
- {
32
- type: 'confirm',
33
- name: 'createStory',
34
- message: 'Document in Storybook?:',
35
- default: true,
36
- },
37
- ],
38
- actions: function ({ path, name, createStory }) {
39
- const componentPath = createComponentPath(path, name);
40
- const componentImportPath = `@/components/${componentPath}.vue`;
41
- return [
42
- {
43
- type: 'add',
44
- path: `src/components/${componentPath}.vue`,
45
- templateFile: 'templates/component.vue.hbs',
46
- skipIfExists: true,
47
- },
48
- {
49
- type: 'add',
50
- path: `tests/unit/components/${componentPath}.spec.ts`,
51
- templateFile: 'templates/spec.ts.hbs',
52
- skipIfExists: true,
53
- data: { componentImportPath },
54
- },
55
- createStory
56
- ? {
57
- type: 'add',
58
- path: `stories/components/${componentPath}.stories.mdx`,
59
- templateFile: 'templates/stories.mdx.hbs',
60
- skipIfExists: true,
61
- data: { componentImportPath },
62
- }
63
- : null,
64
- ].filter(Boolean);
65
- },
66
- });
67
- };
package/project.json DELETED
@@ -1,69 +0,0 @@
1
- {
2
- "root": "libs/citrus-ui",
3
- "sourceRoot": "libs/citrus-ui/src",
4
- "projectType": "library",
5
- "targets": {
6
- "lint": {
7
- "executor": "@nrwl/workspace:run-commands",
8
- "options": {
9
- "commands": [
10
- "vue-cli-service lint --no-fix --max-warnings=0",
11
- "stylelint \"src/**/*.(vue|scss)\"",
12
- "prettier . --ignore-unknown --check --ignore-path='../../.prettierignore'"
13
- ],
14
- "cwd": "libs/citrus-ui"
15
- }
16
- },
17
- "test:unit": {
18
- "executor": "@nrwl/workspace:run-commands",
19
- "options": {
20
- "command": "vue-cli-service test:unit",
21
- "cwd": "libs/citrus-ui"
22
- }
23
- },
24
- "build": {
25
- "executor": "@nrwl/workspace:run-commands",
26
- "options": {
27
- "commands": [
28
- "vue-cli-service build --target lib ./src/index.ts",
29
- "tsc --project tsconfig.dist.json --declaration --emitDeclarationOnly",
30
- "tsc-alias -p tsconfig.dist.json"
31
- ],
32
- "cwd": "libs/citrus-ui",
33
- "parallel": false
34
- }
35
- },
36
- "publish": {
37
- "executor": "@nrwl/workspace:run-commands",
38
- "options": {
39
- "command": "pnpm publish",
40
- "cwd": "libs/citrus-ui"
41
- },
42
- "dependsOn": [{ "target": "build", "projects": "self" }]
43
- },
44
- "storybook:serve": {
45
- "executor": "@nrwl/workspace:run-commands",
46
- "options": {
47
- "command": "vue-cli-service storybook:serve -p 6006 -c .storybook",
48
- "cwd": "libs/citrus-ui"
49
- }
50
- },
51
- "storybook:build": {
52
- "executor": "@nrwl/workspace:run-commands",
53
- "options": {
54
- "command": "vue-cli-service storybook:build -c .storybook",
55
- "cwd": "libs/citrus-ui",
56
- "outputPath": ["storybook-static"]
57
- }
58
- },
59
- "storybook:publish": {
60
- "executor": "@nrwl/workspace:run-commands",
61
- "TODO(mohan)": "Remove --dry-run when we're ready to start developing here.",
62
- "options": {
63
- "command": "storybook-to-aws-s3 --existing-output-dir=\"storybook-static\" --bucket-path=citrus-ui-storybook --aws-profile=NONE --dry-run",
64
- "cwd": "libs/citrus-ui"
65
- },
66
- "dependsOn": [{ "target": "storybook:build", "projects": "self" }]
67
- }
68
- }
69
- }
Binary file
@@ -1,78 +0,0 @@
1
- <template>
2
- <v-snackbar
3
- data-test="alert"
4
- class="c-alert"
5
- top
6
- :color="color"
7
- :timeout="timeout"
8
- :value="value"
9
- @input="(value) => $emit('input', value)"
10
- >
11
- <div data-test="alert-message">
12
- <slot>
13
- {{ message }}
14
- </slot>
15
- </div>
16
-
17
- <c-icon-button
18
- v-if="!shouldAutoDismiss"
19
- data-test="alert-dismiss"
20
- class="c-alert__dismiss"
21
- light
22
- :icon="faTimes"
23
- @click="$emit('input', false)"
24
- />
25
- </v-snackbar>
26
- </template>
27
-
28
- <script lang="ts">
29
- import { faTimes } from '@fortawesome/pro-light-svg-icons';
30
- import { Component, Vue, Prop } from 'vue-property-decorator';
31
-
32
- import CIconButton from '@/components/CIconButton.vue';
33
-
34
- @Component({ name: 'CAlert', components: { CIconButton } })
35
- export default class CAlert extends Vue {
36
- faTimes = faTimes;
37
-
38
- /** Controls whether the alert is shown */
39
- @Prop({ type: Boolean, default: false }) value!: boolean;
40
- @Prop(String) message?: string;
41
- /** Renders the error state */
42
- @Prop({ type: Boolean, default: false }) error!: boolean;
43
- /** Renders the success state */
44
- @Prop({ type: Boolean, default: false }) success!: boolean;
45
- /** Controls (overrides) whether the alert is dismissible. */
46
- @Prop({ type: Boolean, default: undefined }) dismissible?: boolean;
47
-
48
- get shouldAutoDismiss(): boolean {
49
- if (this.dismissible !== undefined) {
50
- return !this.dismissible;
51
- }
52
- return !this.error;
53
- }
54
-
55
- get timeout(): number {
56
- // A 0 timeout in Vuetify World means the component never dismisses itself.
57
- return this.shouldAutoDismiss ? 5000 : 0;
58
- }
59
-
60
- get color(): string | undefined {
61
- if (this.error) {
62
- return 'alert-red';
63
- } else if (this.success) {
64
- return 'accent-green-shade-1';
65
- }
66
-
67
- return undefined;
68
- }
69
- }
70
- </script>
71
-
72
- <style lang="scss" scoped>
73
- .c-alert__dismiss {
74
- height: 36px;
75
- margin: -4px -8px -4px 0 !important;
76
- width: 36px;
77
- }
78
- </style>
@@ -1,47 +0,0 @@
1
- <template>
2
- <div data-test="banner" class="banner" :class="{ [color]: true }">
3
- <font-awesome-icon v-if="icon" class="banner__icon" :icon="icon" />
4
- <p data-test="banner-message" class="banner__message">
5
- {{ message }}
6
- </p>
7
- </div>
8
- </template>
9
-
10
- <script lang="ts">
11
- import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
12
- import { Component, Vue, Prop } from 'vue-property-decorator';
13
-
14
- type Type = 'error' | 'info';
15
-
16
- @Component({ name: 'CBanner', components: { FontAwesomeIcon } })
17
- export default class CBanner extends Vue {
18
- @Prop(String) icon?: string;
19
- @Prop({ type: String, required: true }) message!: string;
20
- @Prop({ type: String, default: 'info' }) type!: Type;
21
-
22
- get color(): string {
23
- if (this.type === 'error') {
24
- return 'peach';
25
- }
26
-
27
- return 'providers-blue';
28
- }
29
- }
30
- </script>
31
-
32
- <style lang="scss" scoped>
33
- .banner {
34
- align-items: flex-start;
35
- display: flex;
36
- padding: 12px 16px;
37
- }
38
-
39
- .banner__icon {
40
- margin-right: 12px;
41
- }
42
-
43
- .banner__message {
44
- flex: auto;
45
- margin: 0;
46
- }
47
- </style>
@@ -1,146 +0,0 @@
1
- <template>
2
- <!--
3
- HACK(mohan): Using :key="disabled" here forces Vue to re-render the whole component. This
4
- fixes a Safari bug where the text color wouldn't change when buttons became re-enabled.
5
- -->
6
- <v-btn
7
- :key="disabled"
8
- class="button"
9
- :class="{
10
- 'button--primary': !secondary && !tertiary,
11
- 'button--secondary': secondary,
12
- 'button--tertiary': tertiary,
13
- 'button--dark': dark,
14
- 'button--light': light,
15
- 'button--disabled': disabled,
16
- }"
17
- data-test="button"
18
- rounded
19
- :block="block"
20
- :elevation="0"
21
- :large="large"
22
- :ripple="false"
23
- :to="to"
24
- :text="tertiary"
25
- :disabled="disabled"
26
- :href="href"
27
- :target="target"
28
- v-on="$listeners"
29
- >
30
- <div v-if="hasIcon" class="button__icon">
31
- <slot name="icon">
32
- <font-awesome-icon v-if="icon" :icon="icon" />
33
- </slot>
34
- </div>
35
-
36
- <span class="button__text">
37
- <slot />
38
- </span>
39
- </v-btn>
40
- </template>
41
-
42
- <script lang="ts">
43
- import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
44
- import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
45
- import { Component, Vue, Prop } from 'vue-property-decorator';
46
- import { RawLocation } from 'vue-router';
47
-
48
- @Component({ name: 'CButton', components: { FontAwesomeIcon } })
49
- export default class CButton extends Vue {
50
- /** Controls whether button appears as full-width */
51
- @Prop({ type: Boolean, default: false }) block!: boolean;
52
- /** Renders navy variant */
53
- @Prop({ type: Boolean, default: false }) dark!: boolean;
54
- @Prop({ type: Boolean, default: false }) disabled!: boolean;
55
- /** Chooses an icon to render on the left side of the button */
56
- @Prop([String, Array, Object]) icon?: IconDefinition;
57
- @Prop({ type: Boolean, default: false }) large!: boolean;
58
- /** Renders white variant */
59
- @Prop({ type: Boolean, default: false }) light!: boolean;
60
- @Prop({ type: Boolean, default: false }) secondary!: boolean;
61
- @Prop({ type: Boolean, default: false }) tertiary!: boolean;
62
- @Prop([Object, String]) to?: RawLocation;
63
- @Prop(String) href?: string;
64
- @Prop(String) target?: string;
65
-
66
- get hasIcon(): boolean {
67
- return !!(this.icon || this.$slots.icon || this.$scopedSlots.icon);
68
- }
69
- }
70
- </script>
71
-
72
- <style lang="scss" scoped>
73
- @import '~@/styles/core.scss';
74
-
75
- @mixin button-theme($color, $background-color) {
76
- background-color: $background-color !important;
77
- color: $color !important;
78
- }
79
-
80
- .button__text {
81
- margin-top: 3px;
82
- }
83
-
84
- .button--primary {
85
- @include button-theme($color-white, $color-accent-blue);
86
- }
87
-
88
- .button--primary.button--dark {
89
- @include button-theme($color-white, $color-navy);
90
- }
91
-
92
- .button--primary.button--light {
93
- @include button-theme($color-navy, $color-white);
94
- }
95
-
96
- .button--secondary {
97
- @include button-theme($color-accent-blue, $color-white);
98
-
99
- border: $border !important;
100
- }
101
-
102
- .button--secondary.button--dark {
103
- @include button-theme($color-navy, $color-white);
104
- }
105
-
106
- .button--secondary.button--light {
107
- @include button-theme($color-white, $color-navy);
108
- }
109
-
110
- .button--tertiary {
111
- @include button-theme($color-accent-blue, transparent);
112
- }
113
-
114
- .button--tertiary.button--dark {
115
- @include button-theme($color-navy, transparent);
116
- }
117
-
118
- .button--tertiary.button--light {
119
- @include button-theme($color-white, transparent);
120
- }
121
-
122
- // Add some insane specificity to override Vuetify.
123
- .button--disabled.theme--light.v-btn.v-btn--disabled:not(.v-btn--outlined) {
124
- &.button--primary {
125
- @include button-theme($color-navy-tint-1, $color-navy-tint-4);
126
- }
127
-
128
- &.button--secondary {
129
- @include button-theme($color-navy-tint-2, $color-white);
130
- }
131
-
132
- &.button--tertiary {
133
- @include button-theme($color-navy-tint-2, transparent);
134
- }
135
- }
136
-
137
- .button__icon {
138
- font-size: $font-size-x-large;
139
- height: 24px;
140
- left: -8px;
141
- position: absolute;
142
- top: 50%;
143
- transform: translateY(-50%);
144
- width: 24px;
145
- }
146
- </style>
@@ -1,29 +0,0 @@
1
- <template>
2
- <v-list-item-action class="c-list-item__action" data-test="list-item-action">
3
- <slot>
4
- <font-awesome-icon data-test="list-item-action-icon" fixed-width :icon="icon" />
5
- </slot>
6
- </v-list-item-action>
7
- </template>
8
-
9
- <script lang="ts">
10
- import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
11
- import { faChevronRight } from '@fortawesome/pro-light-svg-icons';
12
- import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
13
- import { Component, Vue, Prop } from 'vue-property-decorator';
14
-
15
- @Component({ name: 'CListItemAction', components: { FontAwesomeIcon } })
16
- export default class CListItemAction extends Vue {
17
- @Prop({ type: [String, Array, Object], default: () => faChevronRight }) icon!: IconDefinition;
18
- }
19
- </script>
20
-
21
- <style lang="scss" scoped>
22
- @import '~@/styles/core.scss';
23
-
24
- .c-list-item__action {
25
- align-self: flex-start;
26
- color: $color-accent-blue;
27
- font-size: $font-size-icon-medium;
28
- }
29
- </style>
@@ -1,47 +0,0 @@
1
- <template>
2
- <v-btn-toggle
3
- data-test="segmented-button"
4
- :value="value"
5
- rounded
6
- class="segmented-button"
7
- active-class="segmented-button__option--active"
8
- @change="(value) => $emit('change', value)"
9
- >
10
- <slot>
11
- <c-segmented-button-option
12
- v-for="option in options"
13
- :key="option.label"
14
- :value="option.value"
15
- :label="option.label"
16
- />
17
- </slot>
18
- </v-btn-toggle>
19
- </template>
20
-
21
- <script lang="ts">
22
- import { Component, Vue, Prop } from 'vue-property-decorator';
23
-
24
- import CSegmentedButtonOption from '@/components/CSegmentedButtonOption.vue';
25
-
26
- interface SegmentedButtonOption {
27
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
- value: any;
29
- label: string;
30
- }
31
-
32
- @Component({ name: 'CSegmentedButton', components: { CSegmentedButtonOption } })
33
- export default class CSegmentedButton extends Vue {
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- @Prop() value?: any;
36
- /** An array of options like `{ value: true, label: 'Yes' }` */
37
- @Prop({ type: Array, required: true }) options!: SegmentedButtonOption[];
38
- }
39
- </script>
40
-
41
- <style lang="scss" scoped>
42
- @import '~@/styles/core.scss';
43
-
44
- .segmented-button {
45
- width: 100%;
46
- }
47
- </style>
@@ -1,42 +0,0 @@
1
- <template>
2
- <v-btn
3
- class="segmented-button__option"
4
- data-test="segmented-button-option"
5
- :ripple="false"
6
- :value="value"
7
- >
8
- <slot>
9
- {{ label }}
10
- </slot>
11
- </v-btn>
12
- </template>
13
-
14
- <script lang="ts">
15
- import { Component, Vue, Prop } from 'vue-property-decorator';
16
-
17
- @Component({ name: 'CSegmentedButtonOption' })
18
- export default class CSegmentedButtonOption extends Vue {
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- @Prop({ required: true }) value?: any;
21
- @Prop(String) label?: string;
22
- }
23
- </script>
24
-
25
- <style lang="scss" scoped>
26
- @import '~@/styles/core.scss';
27
-
28
- .segmented-button__option {
29
- border: $border !important;
30
- color: $color-navy;
31
- flex: 1 1 0;
32
-
33
- &::before {
34
- color: $color-providers-blue;
35
- }
36
- }
37
-
38
- // This class is applied by the CSegmentedButton component.
39
- .segmented-button__option--active {
40
- background-color: $color-providers-blue !important;
41
- }
42
- </style>
@@ -1,48 +0,0 @@
1
- <template>
2
- <div class="form-field" :data-test="dataTest">
3
- <label
4
- v-if="!hideLabel"
5
- :for="fieldId"
6
- :data-test="`${dataTest}-label`"
7
- class="form-field__label"
8
- :class="{ 'form-field__label--disabled': disabled }"
9
- >
10
- <slot name="label" />
11
- </label>
12
-
13
- <slot />
14
- </div>
15
- </template>
16
-
17
- <script lang="ts">
18
- import { Component, Vue, Prop } from 'vue-property-decorator';
19
-
20
- @Component({ name: 'FormField' })
21
- export default class FormField extends Vue {
22
- @Prop({ type: String, required: true }) fieldId!: string;
23
- @Prop({ type: Boolean, default: false }) disabled!: boolean;
24
- @Prop({ type: Boolean, default: false }) hideLabel!: boolean;
25
- @Prop({ type: String, default: 'form-field' }) dataTest!: string;
26
- }
27
- </script>
28
-
29
- <style lang="scss" scoped>
30
- @import '~@/styles/core.scss';
31
- @import '~@/styles/form-fields.scss';
32
-
33
- .form-field {
34
- border: none;
35
- margin: 0;
36
- padding: 0;
37
- }
38
-
39
- .form-field__label {
40
- display: inline-block;
41
- font-weight: $font-weight-bold;
42
- margin: 0 0 4px 2px;
43
- }
44
-
45
- .form-field__label--disabled {
46
- color: $color-disabled-text;
47
- }
48
- </style>