@ouestfrance/sipa-bms-ui 7.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/README.md +280 -0
  2. package/dist/assets/animated-icons/AnimatedActivityIcon.vue.d.ts +133 -0
  3. package/dist/assets/animated-icons/AnimatedCircleHelpIcon.vue.d.ts +133 -0
  4. package/dist/assets/animated-icons/AnimatedHomeIcon.vue.d.ts +133 -0
  5. package/dist/components/button/BmsButton.spec.d.ts +1 -0
  6. package/dist/components/button/BmsButton.vue.d.ts +24 -0
  7. package/dist/components/button/BmsIconButton.vue.d.ts +23 -0
  8. package/dist/components/button/UiButton.vue.d.ts +26 -0
  9. package/dist/components/button/UiButtonLink.vue.d.ts +20 -0
  10. package/dist/components/feedback/BmsAlert.vue.d.ts +24 -0
  11. package/dist/components/feedback/BmsBadge.vue.d.ts +18 -0
  12. package/dist/components/feedback/BmsCaption.vue.d.ts +6 -0
  13. package/dist/components/feedback/BmsCircularProgress.spec.d.ts +1 -0
  14. package/dist/components/feedback/BmsCircularProgress.vue.d.ts +6 -0
  15. package/dist/components/feedback/BmsLoader.spec.d.ts +1 -0
  16. package/dist/components/feedback/BmsLoader.vue.d.ts +9 -0
  17. package/dist/components/feedback/BmsTooltip.vue.d.ts +28 -0
  18. package/dist/components/feedback/UiTooltip.spec.d.ts +1 -0
  19. package/dist/components/feedback/UiTooltip.vue.d.ts +27 -0
  20. package/dist/components/feedback/tooltip.helper.d.ts +45 -0
  21. package/dist/components/feedback/tooltip.helper.spec.d.ts +1 -0
  22. package/dist/components/form/BmsAutocomplete.vue.d.ts +31 -0
  23. package/dist/components/form/BmsBetweenInput.vue.d.ts +32 -0
  24. package/dist/components/form/BmsChip.vue.d.ts +15 -0
  25. package/dist/components/form/BmsFilePicker.spec.d.ts +1 -0
  26. package/dist/components/form/BmsFilePicker.vue.d.ts +12 -0
  27. package/dist/components/form/BmsInputBooleanCheckbox.vue.d.ts +30 -0
  28. package/dist/components/form/BmsInputCheckboxCaption.spec.d.ts +1 -0
  29. package/dist/components/form/BmsInputCheckboxCaption.vue.d.ts +31 -0
  30. package/dist/components/form/BmsInputCheckboxCaptionGroup.vue.d.ts +25 -0
  31. package/dist/components/form/BmsInputCheckboxGroup.vue.d.ts +24 -0
  32. package/dist/components/form/BmsInputCode.vue.d.ts +27 -0
  33. package/dist/components/form/BmsInputDateTime.vue.d.ts +24 -0
  34. package/dist/components/form/BmsInputFile.spec.d.ts +1 -0
  35. package/dist/components/form/BmsInputFile.vue.d.ts +27 -0
  36. package/dist/components/form/BmsInputNumber.spec.d.ts +1 -0
  37. package/dist/components/form/BmsInputNumber.vue.d.ts +26 -0
  38. package/dist/components/form/BmsInputRadio.vue.d.ts +28 -0
  39. package/dist/components/form/BmsInputRadioCaption.vue.d.ts +30 -0
  40. package/dist/components/form/BmsInputRadioCaptionGroup.vue.d.ts +30 -0
  41. package/dist/components/form/BmsInputRadioGroup.vue.d.ts +30 -0
  42. package/dist/components/form/BmsInputText.spec.d.ts +1 -0
  43. package/dist/components/form/BmsInputText.vue.d.ts +128 -0
  44. package/dist/components/form/BmsInputToggle.vue.d.ts +15 -0
  45. package/dist/components/form/BmsSearch.spec.d.ts +1 -0
  46. package/dist/components/form/BmsSearch.vue.d.ts +187 -0
  47. package/dist/components/form/BmsSelect.spec.d.ts +1 -0
  48. package/dist/components/form/BmsSelect.vue.d.ts +34 -0
  49. package/dist/components/form/BmsTag.vue.d.ts +25 -0
  50. package/dist/components/form/BmsTextArea.spec.d.ts +1 -0
  51. package/dist/components/form/BmsTextArea.vue.d.ts +26 -0
  52. package/dist/components/form/RawAutocomplete.spec.d.ts +1 -0
  53. package/dist/components/form/RawAutocomplete.vue.d.ts +130 -0
  54. package/dist/components/form/RawInputText.vue.d.ts +42 -0
  55. package/dist/components/form/UiBmsInputCheckbox.vue.d.ts +28 -0
  56. package/dist/components/form/UiBmsSwitch.vue.d.ts +14 -0
  57. package/dist/components/layout/BmsCard.vue.d.ts +21 -0
  58. package/dist/components/layout/BmsContentPageLayout.vue.d.ts +17 -0
  59. package/dist/components/layout/BmsForm.vue.d.ts +7 -0
  60. package/dist/components/layout/BmsHeader.vue.d.ts +9 -0
  61. package/dist/components/layout/BmsHeaderTitle.vue.d.ts +22 -0
  62. package/dist/components/layout/BmsModal.spec.d.ts +1 -0
  63. package/dist/components/layout/BmsModal.vue.d.ts +60 -0
  64. package/dist/components/layout/BmsOverlay.vue.d.ts +13 -0
  65. package/dist/components/layout/BmsSection.vue.d.ts +15 -0
  66. package/dist/components/layout/BmsStep.vue.d.ts +27 -0
  67. package/dist/components/layout/BmsStepper.vue.d.ts +13 -0
  68. package/dist/components/layout/UiPopoverMenu.vue.d.ts +23 -0
  69. package/dist/components/navigation/BmsBackButton.vue.d.ts +13 -0
  70. package/dist/components/navigation/BmsBreadcrumb.vue.d.ts +12 -0
  71. package/dist/components/navigation/BmsLink.spec.d.ts +1 -0
  72. package/dist/components/navigation/BmsLink.vue.d.ts +22 -0
  73. package/dist/components/navigation/BmsMenu.spec.d.ts +1 -0
  74. package/dist/components/navigation/BmsMenu.vue.d.ts +21 -0
  75. package/dist/components/navigation/BmsMenuNav.spec.d.ts +1 -0
  76. package/dist/components/navigation/BmsMenuNav.vue.d.ts +23 -0
  77. package/dist/components/navigation/BmsShortLinkMenu.vue.d.ts +20 -0
  78. package/dist/components/navigation/BmsTabs.vue.d.ts +7 -0
  79. package/dist/components/navigation/BmsTenantSwitcher.vue.d.ts +22 -0
  80. package/dist/components/navigation/UiMenuItem.vue.d.ts +11 -0
  81. package/dist/components/navigation/UiTab.vue.d.ts +15 -0
  82. package/dist/components/navigation/UiTenantImage.vue.d.ts +6 -0
  83. package/dist/components/navigation/UiTenantLabel.vue.d.ts +12 -0
  84. package/dist/components/navigation/UiTenantSwitcher.spec.d.ts +1 -0
  85. package/dist/components/navigation/UiTenantSwitcher.vue.d.ts +189 -0
  86. package/dist/components/table/BmsEmptyScreen.vue.d.ts +6 -0
  87. package/dist/components/table/BmsPagination.spec.d.ts +1 -0
  88. package/dist/components/table/BmsPagination.vue.d.ts +35 -0
  89. package/dist/components/table/BmsServerTable.vue.d.ts +74 -0
  90. package/dist/components/table/BmsTable.spec.d.ts +1 -0
  91. package/dist/components/table/BmsTable.vue.d.ts +53 -0
  92. package/dist/components/table/BmsTableFilters.spec.d.ts +1 -0
  93. package/dist/components/table/BmsTableFilters.vue.d.ts +188 -0
  94. package/dist/components/table/DraggableList.vue.d.ts +26 -0
  95. package/dist/components/table/UiBmsTable.spec.d.ts +1 -0
  96. package/dist/components/table/UiBmsTable.vue.d.ts +66 -0
  97. package/dist/components/table/UiFilterButton.vue.d.ts +13 -0
  98. package/dist/components/utils/BmsCocarde.vue.d.ts +11 -0
  99. package/dist/components/utils/BmsProblem.vue.d.ts +9 -0
  100. package/dist/components/utils/BmsRelativeTime.spec.d.ts +1 -0
  101. package/dist/components/utils/BmsRelativeTime.vue.d.ts +11 -0
  102. package/dist/composables/clipboard.composable.d.ts +3 -0
  103. package/dist/composables/index.d.ts +5 -0
  104. package/dist/composables/pagination.composable.d.ts +14 -0
  105. package/dist/composables/pagination.composable.spec.d.ts +1 -0
  106. package/dist/composables/search.composable.d.ts +52 -0
  107. package/dist/composables/search.composable.spec.d.ts +1 -0
  108. package/dist/composables/search.helper.d.ts +7 -0
  109. package/dist/composables/search.helper.spec.d.ts +1 -0
  110. package/dist/composables/sort.composable.d.ts +10 -0
  111. package/dist/composables/sort.composable.spec.d.ts +1 -0
  112. package/dist/composables/userPref.composable.d.ts +6 -0
  113. package/dist/composables/userPref.composable.spec.d.ts +1 -0
  114. package/dist/favicon.ico +0 -0
  115. package/dist/helpers/cocarde.helper.d.ts +1 -0
  116. package/dist/helpers/cocarde.helper.spec.d.ts +1 -0
  117. package/dist/helpers/date.helper.d.ts +26 -0
  118. package/dist/helpers/date.helper.spec.d.ts +1 -0
  119. package/dist/helpers/file.helper.d.ts +5 -0
  120. package/dist/helpers/file.helper.spec.d.ts +1 -0
  121. package/dist/helpers/index.d.ts +6 -0
  122. package/dist/helpers/location.helper.d.ts +10 -0
  123. package/dist/helpers/location.helper.spec.d.ts +1 -0
  124. package/dist/helpers/problem.helper.d.ts +1 -0
  125. package/dist/helpers/problem.helper.spec.d.ts +1 -0
  126. package/dist/helpers/string.helper.d.ts +9 -0
  127. package/dist/helpers/string.helper.spec.d.ts +1 -0
  128. package/dist/helpers/table.helper.d.ts +16 -0
  129. package/dist/helpers/table.helper.spec.d.ts +1 -0
  130. package/dist/index.d.ts +72 -0
  131. package/dist/logo.png +0 -0
  132. package/dist/main.d.ts +0 -0
  133. package/dist/mockServiceWorker.js +344 -0
  134. package/dist/models/breadcrumb.model.d.ts +5 -0
  135. package/dist/models/caption.model.d.ts +6 -0
  136. package/dist/models/chip.model.d.ts +8 -0
  137. package/dist/models/cocarde.model.d.ts +4 -0
  138. package/dist/models/form.model.d.ts +25 -0
  139. package/dist/models/index.d.ts +14 -0
  140. package/dist/models/menu.model.d.ts +18 -0
  141. package/dist/models/modal.model.d.ts +8 -0
  142. package/dist/models/problem.model.d.ts +14 -0
  143. package/dist/models/sort.model.d.ts +11 -0
  144. package/dist/models/status-type.model.d.ts +7 -0
  145. package/dist/models/tab.model.d.ts +7 -0
  146. package/dist/models/table.model.d.ts +53 -0
  147. package/dist/models/tenant.model.d.ts +7 -0
  148. package/dist/models/tooltip.model.d.ts +6 -0
  149. package/dist/plugins/confirm/index.d.ts +9 -0
  150. package/dist/plugins/feature-flipper/FeatureFlipper.vue.d.ts +9 -0
  151. package/dist/plugins/feature-flipper/FeatureFlipperIndicator.vue.d.ts +6 -0
  152. package/dist/plugins/feature-flipper/FeatureFlipperModal.vue.d.ts +16 -0
  153. package/dist/plugins/feature-flipper/featureFlipper.composable.d.ts +10 -0
  154. package/dist/plugins/feature-flipper/featureFlipper.composable.spec.d.ts +1 -0
  155. package/dist/plugins/feature-flipper/featureFlipper.model.d.ts +3 -0
  156. package/dist/plugins/feature-flipper/index.d.ts +4 -0
  157. package/dist/plugins/field/FieldComponent.spec.d.ts +1 -0
  158. package/dist/plugins/field/FieldComponent.vue.d.ts +25 -0
  159. package/dist/plugins/field/FieldDatalist.vue.d.ts +27 -0
  160. package/dist/plugins/field/index.d.ts +2 -0
  161. package/dist/plugins/keycloak-auth-adapter/index.d.ts +20 -0
  162. package/dist/plugins/notifications/NotificationItem.vue.d.ts +12 -0
  163. package/dist/plugins/notifications/NotificationWidget.vue.d.ts +2 -0
  164. package/dist/plugins/notifications/index.d.ts +11 -0
  165. package/dist/plugins/notifications/notification.model.d.ts +20 -0
  166. package/dist/plugins/router-history/index.d.ts +6 -0
  167. package/dist/plugins/router-history/router-history.composable.d.ts +7 -0
  168. package/dist/plugins/router-history/router-history.composable.spec.d.ts +1 -0
  169. package/dist/plugins/runtime-env/index.d.ts +7 -0
  170. package/dist/services/index.d.ts +1 -0
  171. package/dist/services/konami.service.d.ts +2 -0
  172. package/dist/showroom/App.vue.d.ts +2 -0
  173. package/dist/showroom/router.d.ts +8 -0
  174. package/dist/sipa-bms-ui.css +3024 -0
  175. package/dist/sipa-bms-ui.es.js +102694 -0
  176. package/dist/sipa-bms-ui.es.js.map +1 -0
  177. package/dist/sipa-bms-ui.umd.js +102815 -0
  178. package/dist/sipa-bms-ui.umd.js.map +1 -0
  179. package/package.json +126 -0
  180. package/src/assets/animated-icons/AnimatedActivityIcon.vue +77 -0
  181. package/src/assets/animated-icons/AnimatedCircleHelpIcon.vue +67 -0
  182. package/src/assets/animated-icons/AnimatedHomeIcon.vue +69 -0
  183. package/src/assets/empty.svg +1 -0
  184. package/src/assets/scss/_conf.scss +203 -0
  185. package/src/assets/scss/_formkit.scss +353 -0
  186. package/src/assets/scss/app.scss +11 -0
  187. package/src/assets/scss/global-variables.scss +56 -0
  188. package/src/components/button/BmsAllButtons.stories.js +56 -0
  189. package/src/components/button/BmsButton.spec.ts +37 -0
  190. package/src/components/button/BmsButton.stories.js +84 -0
  191. package/src/components/button/BmsButton.vue +50 -0
  192. package/src/components/button/BmsIconButton.stories.js +67 -0
  193. package/src/components/button/BmsIconButton.vue +34 -0
  194. package/src/components/button/UiButton.stories.js +131 -0
  195. package/src/components/button/UiButton.vue +37 -0
  196. package/src/components/button/UiButtonLink.vue +186 -0
  197. package/src/components/feedback/BmsAlert.stories.js +75 -0
  198. package/src/components/feedback/BmsAlert.vue +91 -0
  199. package/src/components/feedback/BmsBadge.stories.js +34 -0
  200. package/src/components/feedback/BmsBadge.vue +76 -0
  201. package/src/components/feedback/BmsCaption.stories.js +59 -0
  202. package/src/components/feedback/BmsCaption.vue +88 -0
  203. package/src/components/feedback/BmsCircularProgress.spec.ts +14 -0
  204. package/src/components/feedback/BmsCircularProgress.stories.js +45 -0
  205. package/src/components/feedback/BmsCircularProgress.vue +64 -0
  206. package/src/components/feedback/BmsLoader.spec.ts +7 -0
  207. package/src/components/feedback/BmsLoader.stories.js +31 -0
  208. package/src/components/feedback/BmsLoader.vue +82 -0
  209. package/src/components/feedback/BmsTooltip.stories.js +65 -0
  210. package/src/components/feedback/BmsTooltip.vue +102 -0
  211. package/src/components/feedback/Notification.stories.js +37 -0
  212. package/src/components/feedback/UiTooltip.spec.ts +62 -0
  213. package/src/components/feedback/UiTooltip.stories.js +71 -0
  214. package/src/components/feedback/UiTooltip.vue +219 -0
  215. package/src/components/feedback/tooltip.helper.spec.ts +92 -0
  216. package/src/components/feedback/tooltip.helper.ts +121 -0
  217. package/src/components/form/BmsAutocomplete.stories.js +90 -0
  218. package/src/components/form/BmsAutocomplete.vue +100 -0
  219. package/src/components/form/BmsBetweenInput.stories.js +69 -0
  220. package/src/components/form/BmsBetweenInput.vue +146 -0
  221. package/src/components/form/BmsChip.stories.js +65 -0
  222. package/src/components/form/BmsChip.vue +92 -0
  223. package/src/components/form/BmsFilePicker.spec.ts +94 -0
  224. package/src/components/form/BmsFilePicker.stories.js +53 -0
  225. package/src/components/form/BmsFilePicker.vue +186 -0
  226. package/src/components/form/BmsInputBooleanCheckbox.stories.js +90 -0
  227. package/src/components/form/BmsInputBooleanCheckbox.vue +70 -0
  228. package/src/components/form/BmsInputCheckboxCaption.spec.ts +45 -0
  229. package/src/components/form/BmsInputCheckboxCaption.stories.js +92 -0
  230. package/src/components/form/BmsInputCheckboxCaption.vue +126 -0
  231. package/src/components/form/BmsInputCheckboxCaptionGroup.stories.js +153 -0
  232. package/src/components/form/BmsInputCheckboxCaptionGroup.vue +81 -0
  233. package/src/components/form/BmsInputCheckboxGroup.stories.js +94 -0
  234. package/src/components/form/BmsInputCheckboxGroup.vue +94 -0
  235. package/src/components/form/BmsInputCode.stories.js +43 -0
  236. package/src/components/form/BmsInputCode.vue +71 -0
  237. package/src/components/form/BmsInputDateTime.stories.js +71 -0
  238. package/src/components/form/BmsInputDateTime.vue +55 -0
  239. package/src/components/form/BmsInputFile.spec.ts +90 -0
  240. package/src/components/form/BmsInputFile.stories.js +156 -0
  241. package/src/components/form/BmsInputFile.vue +310 -0
  242. package/src/components/form/BmsInputNumber.spec.ts +40 -0
  243. package/src/components/form/BmsInputNumber.stories.js +79 -0
  244. package/src/components/form/BmsInputNumber.vue +67 -0
  245. package/src/components/form/BmsInputRadio.stories.js +79 -0
  246. package/src/components/form/BmsInputRadio.vue +121 -0
  247. package/src/components/form/BmsInputRadioCaption.stories.js +98 -0
  248. package/src/components/form/BmsInputRadioCaption.vue +110 -0
  249. package/src/components/form/BmsInputRadioCaptionGroup.stories.js +166 -0
  250. package/src/components/form/BmsInputRadioCaptionGroup.vue +81 -0
  251. package/src/components/form/BmsInputRadioGroup.stories.js +108 -0
  252. package/src/components/form/BmsInputRadioGroup.vue +93 -0
  253. package/src/components/form/BmsInputText.spec.ts +37 -0
  254. package/src/components/form/BmsInputText.stories.js +78 -0
  255. package/src/components/form/BmsInputText.vue +79 -0
  256. package/src/components/form/BmsInputToggle.stories.js +37 -0
  257. package/src/components/form/BmsInputToggle.vue +66 -0
  258. package/src/components/form/BmsSearch.spec.ts +41 -0
  259. package/src/components/form/BmsSearch.stories.js +70 -0
  260. package/src/components/form/BmsSearch.vue +62 -0
  261. package/src/components/form/BmsSelect.spec.ts +57 -0
  262. package/src/components/form/BmsSelect.stories.js +131 -0
  263. package/src/components/form/BmsSelect.vue +225 -0
  264. package/src/components/form/BmsTag.stories.js +64 -0
  265. package/src/components/form/BmsTag.vue +109 -0
  266. package/src/components/form/BmsTextArea.spec.ts +37 -0
  267. package/src/components/form/BmsTextArea.stories.js +74 -0
  268. package/src/components/form/BmsTextArea.vue +112 -0
  269. package/src/components/form/Form.stories.js +35 -0
  270. package/src/components/form/RawAutocomplete.spec.ts +103 -0
  271. package/src/components/form/RawAutocomplete.vue +218 -0
  272. package/src/components/form/RawInputText.vue +173 -0
  273. package/src/components/form/UiBmsInputCheckbox.stories.js +77 -0
  274. package/src/components/form/UiBmsInputCheckbox.vue +126 -0
  275. package/src/components/form/UiBmsSwitch.stories.js +40 -0
  276. package/src/components/form/UiBmsSwitch.vue +80 -0
  277. package/src/components/layout/BmsCard.stories.js +77 -0
  278. package/src/components/layout/BmsCard.vue +133 -0
  279. package/src/components/layout/BmsContentPageLayout.vue +92 -0
  280. package/src/components/layout/BmsForm.stories.js +30 -0
  281. package/src/components/layout/BmsForm.vue +42 -0
  282. package/src/components/layout/BmsHeader.stories.js +29 -0
  283. package/src/components/layout/BmsHeader.vue +16 -0
  284. package/src/components/layout/BmsHeaderTitle.stories.js +68 -0
  285. package/src/components/layout/BmsHeaderTitle.vue +76 -0
  286. package/src/components/layout/BmsModal.spec.ts +174 -0
  287. package/src/components/layout/BmsModal.stories.js +153 -0
  288. package/src/components/layout/BmsModal.vue +359 -0
  289. package/src/components/layout/BmsOverlay.stories.js +34 -0
  290. package/src/components/layout/BmsOverlay.vue +28 -0
  291. package/src/components/layout/BmsSection.stories.js +45 -0
  292. package/src/components/layout/BmsSection.vue +35 -0
  293. package/src/components/layout/BmsStep.stories.js +71 -0
  294. package/src/components/layout/BmsStep.vue +60 -0
  295. package/src/components/layout/BmsStepper.stories.js +57 -0
  296. package/src/components/layout/BmsStepper.vue +195 -0
  297. package/src/components/layout/UiPopoverMenu.vue +167 -0
  298. package/src/components/navigation/BmsBackButton.stories.js +27 -0
  299. package/src/components/navigation/BmsBackButton.vue +38 -0
  300. package/src/components/navigation/BmsBreadcrumb.stories.js +80 -0
  301. package/src/components/navigation/BmsBreadcrumb.vue +45 -0
  302. package/src/components/navigation/BmsLink.spec.ts +45 -0
  303. package/src/components/navigation/BmsLink.vue +59 -0
  304. package/src/components/navigation/BmsMenu.spec.ts +95 -0
  305. package/src/components/navigation/BmsMenu.stories.js +85 -0
  306. package/src/components/navigation/BmsMenu.vue +148 -0
  307. package/src/components/navigation/BmsMenuNav.spec.ts +140 -0
  308. package/src/components/navigation/BmsMenuNav.stories.js +187 -0
  309. package/src/components/navigation/BmsMenuNav.vue +217 -0
  310. package/src/components/navigation/BmsShortLinkMenu.stories.js +55 -0
  311. package/src/components/navigation/BmsShortLinkMenu.vue +59 -0
  312. package/src/components/navigation/BmsTabs.stories.js +30 -0
  313. package/src/components/navigation/BmsTabs.vue +46 -0
  314. package/src/components/navigation/BmsTenantSwitcher.stories.js +89 -0
  315. package/src/components/navigation/BmsTenantSwitcher.vue +135 -0
  316. package/src/components/navigation/UiMenuItem.stories.js +73 -0
  317. package/src/components/navigation/UiMenuItem.vue +116 -0
  318. package/src/components/navigation/UiMenuItemStatus.stories.js +58 -0
  319. package/src/components/navigation/UiTab.stories.js +56 -0
  320. package/src/components/navigation/UiTab.vue +71 -0
  321. package/src/components/navigation/UiTenantImage.vue +22 -0
  322. package/src/components/navigation/UiTenantLabel.vue +94 -0
  323. package/src/components/navigation/UiTenantSwitcher.spec.ts +167 -0
  324. package/src/components/navigation/UiTenantSwitcher.stories.js +70 -0
  325. package/src/components/navigation/UiTenantSwitcher.vue +161 -0
  326. package/src/components/table/BmsEmptyScreen.stories.js +32 -0
  327. package/src/components/table/BmsEmptyScreen.vue +54 -0
  328. package/src/components/table/BmsPagination.spec.ts +73 -0
  329. package/src/components/table/BmsPagination.stories.js +34 -0
  330. package/src/components/table/BmsPagination.vue +154 -0
  331. package/src/components/table/BmsServerTable.stories.js +422 -0
  332. package/src/components/table/BmsServerTable.vue +402 -0
  333. package/src/components/table/BmsTable.spec.ts +309 -0
  334. package/src/components/table/BmsTable.stories.js +930 -0
  335. package/src/components/table/BmsTable.vue +308 -0
  336. package/src/components/table/BmsTableFilters.spec.ts +494 -0
  337. package/src/components/table/BmsTableFilters.stories.js +114 -0
  338. package/src/components/table/BmsTableFilters.vue +268 -0
  339. package/src/components/table/DraggableList.stories.js +29 -0
  340. package/src/components/table/DraggableList.vue +179 -0
  341. package/src/components/table/UiBmsTable.spec.ts +373 -0
  342. package/src/components/table/UiBmsTable.stories.js +563 -0
  343. package/src/components/table/UiBmsTable.vue +617 -0
  344. package/src/components/table/UiFilterButton.stories.js +37 -0
  345. package/src/components/table/UiFilterButton.vue +85 -0
  346. package/src/components/utils/BmsCocarde.stories.js +47 -0
  347. package/src/components/utils/BmsCocarde.vue +66 -0
  348. package/src/components/utils/BmsProblem.stories.js +82 -0
  349. package/src/components/utils/BmsProblem.vue +223 -0
  350. package/src/components/utils/BmsRelativeTime.spec.ts +41 -0
  351. package/src/components/utils/BmsRelativeTime.stories.js +48 -0
  352. package/src/components/utils/BmsRelativeTime.vue +57 -0
  353. package/src/composables/clipboard.composable.ts +14 -0
  354. package/src/composables/index.ts +5 -0
  355. package/src/composables/pagination.composable.spec.ts +258 -0
  356. package/src/composables/pagination.composable.ts +111 -0
  357. package/src/composables/search.composable.spec.ts +1296 -0
  358. package/src/composables/search.composable.ts +316 -0
  359. package/src/composables/search.helper.spec.ts +339 -0
  360. package/src/composables/search.helper.ts +103 -0
  361. package/src/composables/sort.composable.spec.ts +349 -0
  362. package/src/composables/sort.composable.ts +129 -0
  363. package/src/composables/userPref.composable.spec.ts +115 -0
  364. package/src/composables/userPref.composable.ts +43 -0
  365. package/src/documentation/ColorTile.vue +23 -0
  366. package/src/documentation/assets/BmsIcon.png +0 -0
  367. package/src/documentation/assets/CoverBmsUI.png +0 -0
  368. package/src/documentation/assets/button/CoverPrimaryButton.png +0 -0
  369. package/src/documentation/assets/button/CoverSecondaryButton.png +0 -0
  370. package/src/documentation/assets/button/DoButtonLabel.png +0 -0
  371. package/src/documentation/assets/button/DontButtonLabel.png +0 -0
  372. package/src/documentation/assets/button/PrimaryButtonRepresentation.png +0 -0
  373. package/src/documentation/assets/cards/CardRepresentation.png +0 -0
  374. package/src/documentation/assets/cards/CoverCard.png +0 -0
  375. package/src/documentation/assets/chip/ChipRepresentation.png +0 -0
  376. package/src/documentation/assets/chip/CoverChips.png +0 -0
  377. package/src/documentation/assets/fields/Anatomy.png +0 -0
  378. package/src/documentation/assets/fields/CaptionRepresentation.png +0 -0
  379. package/src/documentation/assets/fields/CaptionTextRepresentation.png +0 -0
  380. package/src/documentation/assets/fields/CoverFieldsAnatomy.png +0 -0
  381. package/src/documentation/assets/fields/CoverInputFile.png +0 -0
  382. package/src/documentation/assets/fields/CoverInputText.png +0 -0
  383. package/src/documentation/assets/fields/CoverRadioCaptionGroup.png +0 -0
  384. package/src/documentation/assets/fields/CoverRadioGroup.png +0 -0
  385. package/src/documentation/assets/fields/CoverSearch.png +0 -0
  386. package/src/documentation/assets/fields/CoverSelect.png +0 -0
  387. package/src/documentation/assets/fields/CoverTextArea.png +0 -0
  388. package/src/documentation/assets/fields/FieldLabel.png +0 -0
  389. package/src/documentation/assets/fields/InputMediaRepresentation.png +0 -0
  390. package/src/documentation/assets/fields/InputRepresentation.png +0 -0
  391. package/src/documentation/assets/fields/InputSearchRepresentation.png +0 -0
  392. package/src/documentation/assets/fields/InputText.png +0 -0
  393. package/src/documentation/assets/fields/InputTextAreaRepresentation.png +0 -0
  394. package/src/documentation/assets/fields/LabelDo.png +0 -0
  395. package/src/documentation/assets/fields/LabelDont.png +0 -0
  396. package/src/documentation/assets/fields/LabelRepresentation.png +0 -0
  397. package/src/documentation/assets/fields/RadioCaptionGroupRepresentation.png +0 -0
  398. package/src/documentation/assets/fields/RadioGroupRepresentation.png +0 -0
  399. package/src/documentation/assets/fields/SelectRepresentation.png +0 -0
  400. package/src/documentation/assets/tag/CoverTag.png +0 -0
  401. package/src/documentation/assets/tag/TagRepresentation.png +0 -0
  402. package/src/documentation/button.mdx +24 -0
  403. package/src/documentation/card.mdx +28 -0
  404. package/src/documentation/chip.mdx +28 -0
  405. package/src/documentation/colors.mdx +118 -0
  406. package/src/documentation/fields.mdx +52 -0
  407. package/src/documentation/fields_text.mdx +31 -0
  408. package/src/documentation/icons.mdx +33 -0
  409. package/src/documentation/inputFile.mdx +28 -0
  410. package/src/documentation/primaryButton.mdx +20 -0
  411. package/src/documentation/principles.mdx +23 -0
  412. package/src/documentation/radioCaptionGroup.mdx +34 -0
  413. package/src/documentation/radioGroup.mdx +34 -0
  414. package/src/documentation/search.mdx +28 -0
  415. package/src/documentation/secondaryButton.mdx +17 -0
  416. package/src/documentation/select.mdx +31 -0
  417. package/src/documentation/tag.mdx +28 -0
  418. package/src/documentation/template_field_dependency.mdx +19 -0
  419. package/src/documentation/textArea.mdx +27 -0
  420. package/src/documentation/typography.mdx +93 -0
  421. package/src/documentation/typography.stories.js +26 -0
  422. package/src/helpers/cocarde.helper.spec.ts +14 -0
  423. package/src/helpers/cocarde.helper.ts +22 -0
  424. package/src/helpers/date.helper.spec.ts +91 -0
  425. package/src/helpers/date.helper.ts +105 -0
  426. package/src/helpers/file.helper.spec.ts +60 -0
  427. package/src/helpers/file.helper.ts +24 -0
  428. package/src/helpers/index.ts +6 -0
  429. package/src/helpers/location.helper.spec.ts +195 -0
  430. package/src/helpers/location.helper.ts +53 -0
  431. package/src/helpers/problem.helper.spec.ts +21 -0
  432. package/src/helpers/problem.helper.ts +4 -0
  433. package/src/helpers/string.helper.spec.ts +186 -0
  434. package/src/helpers/string.helper.ts +83 -0
  435. package/src/helpers/table.helper.spec.ts +141 -0
  436. package/src/helpers/table.helper.ts +88 -0
  437. package/src/index.ts +203 -0
  438. package/src/main.ts +25 -0
  439. package/src/models/breadcrumb.model.ts +6 -0
  440. package/src/models/caption.model.ts +7 -0
  441. package/src/models/chip.model.ts +8 -0
  442. package/src/models/cocarde.model.ts +4 -0
  443. package/src/models/form.model.ts +30 -0
  444. package/src/models/index.ts +14 -0
  445. package/src/models/menu.model.ts +20 -0
  446. package/src/models/modal.model.ts +9 -0
  447. package/src/models/problem.model.ts +10 -0
  448. package/src/models/sort.model.ts +13 -0
  449. package/src/models/status-type.model.ts +7 -0
  450. package/src/models/tab.model.ts +7 -0
  451. package/src/models/table.model.ts +58 -0
  452. package/src/models/tenant.model.ts +7 -0
  453. package/src/models/tooltip.model.ts +6 -0
  454. package/src/pages/Form.stories.js +83 -0
  455. package/src/pages/List.stories.js +88 -0
  456. package/src/plugins/confirm/index.ts +109 -0
  457. package/src/plugins/feature-flipper/FeatureFlipper.vue +23 -0
  458. package/src/plugins/feature-flipper/FeatureFlipperIndicator.vue +27 -0
  459. package/src/plugins/feature-flipper/FeatureFlipperModal.vue +68 -0
  460. package/src/plugins/feature-flipper/featureFlipper.composable.spec.ts +107 -0
  461. package/src/plugins/feature-flipper/featureFlipper.composable.ts +68 -0
  462. package/src/plugins/feature-flipper/featureFlipper.model.ts +1 -0
  463. package/src/plugins/feature-flipper/index.ts +15 -0
  464. package/src/plugins/field/FieldComponent.spec.ts +34 -0
  465. package/src/plugins/field/FieldComponent.stories.js +78 -0
  466. package/src/plugins/field/FieldComponent.vue +208 -0
  467. package/src/plugins/field/FieldDatalist.stories.js +35 -0
  468. package/src/plugins/field/FieldDatalist.vue +68 -0
  469. package/src/plugins/field/index.ts +31 -0
  470. package/src/plugins/keycloak-auth-adapter/index.ts +102 -0
  471. package/src/plugins/notifications/NotificationItem.stories.js +60 -0
  472. package/src/plugins/notifications/NotificationItem.vue +116 -0
  473. package/src/plugins/notifications/NotificationWidget.vue +129 -0
  474. package/src/plugins/notifications/index.ts +83 -0
  475. package/src/plugins/notifications/notification.model.ts +24 -0
  476. package/src/plugins/notifications/notifications.spec.js +78 -0
  477. package/src/plugins/router-history/index.ts +23 -0
  478. package/src/plugins/router-history/router-history.composable.spec.ts +323 -0
  479. package/src/plugins/router-history/router-history.composable.ts +47 -0
  480. package/src/plugins/runtime-env/index.ts +19 -0
  481. package/src/services/index.ts +1 -0
  482. package/src/services/konami.service.ts +28 -0
  483. package/src/showroom/App.vue +109 -0
  484. package/src/showroom/db.json +1967 -0
  485. package/src/showroom/pages/autocomplete.vue +54 -0
  486. package/src/showroom/pages/draggable-list.vue +20 -0
  487. package/src/showroom/pages/file-picker.vue +74 -0
  488. package/src/showroom/pages/forms.vue +389 -0
  489. package/src/showroom/pages/index.vue +209 -0
  490. package/src/showroom/pages/paginated-cards.vue +48 -0
  491. package/src/showroom/pages/server-table.vue +160 -0
  492. package/src/showroom/pages/stepper.vue +37 -0
  493. package/src/showroom/pages/table.vue +192 -0
  494. package/src/showroom/pages/tabs/[tabName].vue +28 -0
  495. package/src/showroom/router.ts +15 -0
  496. package/src/showroom/server.js +45 -0
  497. package/src/vite-env.d.ts +9 -0
@@ -0,0 +1,67 @@
1
+ import { Heart } from 'lucide-vue-next';
2
+ import BmsIconButton from './BmsIconButton.vue';
3
+ import { StatusType } from '@/models';
4
+ import { vueRouter } from 'storybook-vue3-router';
5
+
6
+ export default {
7
+ title: 'Composants/button/IconButton',
8
+ component: BmsIconButton,
9
+ decorators: [
10
+ vueRouter([
11
+ {
12
+ name: 'firstRoute',
13
+ path: '/toto',
14
+ },
15
+ ]),
16
+ ],
17
+ argTypes: {
18
+ mode: {
19
+ control: { type: 'select' },
20
+ options: ['default', 'danger'],
21
+ },
22
+ to: { control: { type: 'text' } },
23
+ },
24
+ };
25
+
26
+ const Template = (args) => ({
27
+ components: {
28
+ BmsIconButton,
29
+ Heart,
30
+ },
31
+ setup() {
32
+ return { args };
33
+ },
34
+ template: `
35
+ <br><b>default</b>
36
+ <BmsIconButton v-bind="args"><Heart/></BmsIconButton>
37
+ <br>
38
+ <br> <b>:hover</b>
39
+ <BmsIconButton v-bind="args" class="_hover"><Heart/></BmsIconButton>
40
+
41
+
42
+ <br> <b>BmsIconButton must be on same alignment (using BmsLink and native button html tag)</b>
43
+ <BmsIconButton
44
+ tooltip-text="BmsIconButton with BmsLink"
45
+ to="/toto"
46
+ >
47
+ <Heart/>
48
+ </BmsIconButton>
49
+ <BmsIconButton
50
+ tooltip-text="BmsIconButton with button html tag"
51
+ >
52
+ <Heart />
53
+ </BmsIconButton>
54
+ `,
55
+ });
56
+
57
+ export const IconButton = Template.bind({});
58
+ IconButton.args = {};
59
+
60
+ export const IconButtonWithTargetLink = Template.bind({});
61
+ IconButtonWithTargetLink.args = {
62
+ target: '_blank',
63
+ to: { name: 'firstRoute' },
64
+ };
65
+
66
+ export const DangerIconButton = Template.bind({});
67
+ DangerIconButton.args = { mode: StatusType.Danger };
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <BmsTooltip
3
+ :activated="activated"
4
+ :tooltip-text="tooltipText"
5
+ :direction="tooltipDirection"
6
+ >
7
+ <UiButton v-bind="$attrs" icon :to="to" :target="target" :color="mode">
8
+ <slot></slot>
9
+ </UiButton>
10
+ </BmsTooltip>
11
+ </template>
12
+
13
+ <script setup lang="ts">
14
+ import { RouteLocationRaw } from 'vue-router';
15
+ import UiButton from './UiButton.vue';
16
+ import { computed, ComputedRef } from 'vue';
17
+ import { StatusType } from '@/models';
18
+ import { BmsTooltip, TooltipDirection } from '@/index';
19
+
20
+ interface Props {
21
+ to?: RouteLocationRaw | null;
22
+ target?: string;
23
+ mode?: StatusType.Danger | StatusType.Information;
24
+ tooltipText?: string;
25
+ tooltipDirection?: TooltipDirection;
26
+ }
27
+ const props = withDefaults(defineProps<Props>(), {
28
+ mode: StatusType.Information,
29
+ to: null,
30
+ tooltipText: '',
31
+ });
32
+
33
+ const activated: ComputedRef<boolean> = computed(() => !!props.tooltipText);
34
+ </script>
@@ -0,0 +1,131 @@
1
+ import UiButton from '@/components/button/UiButton.vue';
2
+ import { StatusType } from '@/models/';
3
+ import {
4
+ ArrowLeft,
5
+ ArrowRight,
6
+ Camera,
7
+ Heart,
8
+ Wand,
9
+ Citrus,
10
+ } from 'lucide-vue-next';
11
+ import { vueRouter } from 'storybook-vue3-router';
12
+
13
+ export default {
14
+ title: 'Composants/button/UiButton',
15
+ component: UiButton,
16
+ argTypes: {
17
+ color: {
18
+ control: { type: 'select' },
19
+ options: [
20
+ StatusType.Danger,
21
+ StatusType.Default,
22
+ StatusType.Success,
23
+ StatusType.Warning,
24
+ StatusType.Information,
25
+ ],
26
+ },
27
+ mode: {
28
+ control: { type: 'select' },
29
+ options: ['fill', 'ghost', 'outline'],
30
+ },
31
+ type: {
32
+ control: { type: 'select' },
33
+ options: ['button', 'submit'],
34
+ },
35
+ to: { control: { type: 'text' } },
36
+ },
37
+ decorators: [
38
+ vueRouter([
39
+ {
40
+ name: 'route',
41
+ path: '/ma-route',
42
+ },
43
+ ]),
44
+ ],
45
+ };
46
+
47
+ const Template = (args) => ({
48
+ components: {
49
+ UiButton,
50
+ ArrowRight,
51
+ ArrowLeft,
52
+ Camera,
53
+ Heart,
54
+ Wand,
55
+ },
56
+ setup() {
57
+ return { args };
58
+ },
59
+ template: `
60
+ <UiButton v-bind="args">Save me</UiButton>
61
+ <br>
62
+ <br>
63
+ <UiButton v-bind="args">
64
+ Next page
65
+ <template #end><ArrowRight /></template>
66
+ </UiButton>
67
+ <br>
68
+ <br>
69
+ <UiButton v-bind="args">
70
+ <template #start>
71
+ <Heart/>
72
+ </template>
73
+ Icons left & right
74
+ <template #end>
75
+ <Wand/>
76
+ </template>
77
+ </UiButton>
78
+ <br>
79
+ <br>
80
+ <UiButton v-bind="args">
81
+ <template #start><ArrowLeft /></template>
82
+ Retour
83
+ </UiButton>
84
+ <br>
85
+ `,
86
+ });
87
+
88
+ const TemplateIcon = ({ mode }) => ({
89
+ components: {
90
+ UiButton,
91
+ Heart,
92
+ Wand,
93
+ Citrus,
94
+ },
95
+ setup() {
96
+ return { mode };
97
+ },
98
+ template: `
99
+ <div style="display:flex; gap:1rem; margin:1rem 0; flex-wrap: wrap;" v-for="color in ['main', 'danger']">
100
+ <UiButton icon mode="ghost" :color="color">
101
+ <Wand/>
102
+ </UiButton>
103
+ <UiButton icon mode="ghost" :color="color" class="_hover">
104
+ <Heart/>
105
+ </UiButton>
106
+ <UiButton icon mode="ghost" :color="color" disabled>
107
+ <Citrus />
108
+ </UiButton>
109
+ </div>
110
+ `,
111
+ });
112
+
113
+ export const IconButton = TemplateIcon.bind({});
114
+ IconButton.args = {};
115
+
116
+ export const IconButtonWithRouterArg = Template.bind({});
117
+ IconButtonWithRouterArg.args = { to: { name: 'route' } };
118
+
119
+ export const Error = Template.bind({});
120
+ Error.args = {
121
+ color: StatusType.Danger,
122
+ };
123
+
124
+ export const PrimaryUI = Template.bind({});
125
+ PrimaryUI.args = {};
126
+
127
+ export const SecondaryUI = Template.bind({});
128
+ SecondaryUI.args = {
129
+ color: StatusType.Default,
130
+ mode: 'outline',
131
+ };
@@ -0,0 +1,37 @@
1
+ <template>
2
+ <UiButtonLink v-bind="props">
3
+ <span class="start">
4
+ <slot name="start"></slot>
5
+ </span>
6
+
7
+ <span class="content">
8
+ <slot></slot>
9
+ </span>
10
+
11
+ <span class="end">
12
+ <slot name="end"></slot>
13
+ </span>
14
+ </UiButtonLink>
15
+ </template>
16
+
17
+ <script setup lang="ts">
18
+ import { StatusType } from '@/models';
19
+ import { RouteLocationRaw } from 'vue-router';
20
+ import UiButtonLink from './UiButtonLink.vue';
21
+
22
+ interface Props {
23
+ type?: 'button' | 'submit';
24
+ to?: RouteLocationRaw | null;
25
+ color?: StatusType;
26
+ mode?: 'fill' | 'ghost' | 'outline';
27
+ icon?: boolean;
28
+ }
29
+
30
+ const props = withDefaults(defineProps<Props>(), {
31
+ to: null,
32
+ type: 'button',
33
+ color: StatusType.Default,
34
+ mode: 'fill',
35
+ icon: false,
36
+ });
37
+ </script>
@@ -0,0 +1,186 @@
1
+ <template>
2
+ <template v-if="to === null">
3
+ <button :class="classes" :type="type">
4
+ <slot />
5
+ </button>
6
+ </template>
7
+ <template v-else>
8
+ <BmsLink :to="to" :target="target" :classes="classes">
9
+ <slot />
10
+ </BmsLink>
11
+ </template>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ import { StatusType } from '@/models';
16
+ import { computed, useAttrs } from 'vue';
17
+ import { RouteLocationRaw } from 'vue-router';
18
+ import BmsLink from '@/components/navigation/BmsLink.vue';
19
+
20
+ interface Props {
21
+ type: 'button' | 'submit';
22
+ to: RouteLocationRaw | null;
23
+ target?: string;
24
+ color: StatusType;
25
+ mode: 'fill' | 'ghost' | 'outline';
26
+ icon: boolean;
27
+ }
28
+
29
+ const props = defineProps<Props>();
30
+ const attrs = useAttrs();
31
+
32
+ const classes = computed(() => {
33
+ const disabled = attrs && (!!attrs.disabled || attrs.disabled === '');
34
+ return `bms-button is-${props.color}${
35
+ props.icon ? ' is-icon' : ` bms-button--${props.mode}`
36
+ } ${disabled ? ' bms-button--disabled' : ''} `;
37
+ });
38
+ </script>
39
+
40
+ <style lang="scss">
41
+ @function color($colorName, $colorIntensity: '100') {
42
+ @return #{var(#{'--bms-' + $colorName + '-' + $colorIntensity})};
43
+ }
44
+
45
+ @mixin selectColorsToApply($colorName) {
46
+ &.is-icon {
47
+ padding: 0.5em 0;
48
+
49
+ --bms-button-background-color: transparent;
50
+ --bms-button-border-color: transparent;
51
+ --bms-button-text-color: var(--bms-grey-100);
52
+
53
+ --bms-button-hover-background-color: #{color($colorName, '10')};
54
+ --bms-button-hover-border-color: transparent;
55
+ --bms-button-hover-text-color: #{color($colorName, '140')};
56
+
57
+ --bms-button-disabled-background-color: transparent;
58
+ --bms-button-disabled-border-color: transparent;
59
+ --bms-button-disabled-text-color: var(--bms-disabled-color);
60
+ }
61
+ &.bms-button--fill {
62
+ --bms-button-background-color: #{color($colorName)};
63
+ --bms-button-border-color: #{color($colorName)};
64
+ --bms-button-text-color: white;
65
+
66
+ --bms-button-hover-background-color: #{color($colorName, '140')};
67
+ --bms-button-hover-border-color: #{color($colorName, '140')};
68
+ --bms-button-hover-text-color: white;
69
+
70
+ --bms-button-disabled-background-color: var(--bms-disabled-color);
71
+ --bms-button-disabled-border-color: var(--bms-disabled-color);
72
+ --bms-button-disabled-text-color: white;
73
+ }
74
+
75
+ &.bms-button--outline {
76
+ --bms-button-background-color: transparent;
77
+ --bms-button-border-color: #{color($colorName)};
78
+ --bms-button-text-color: #{color($colorName)};
79
+
80
+ --bms-button-hover-background-color: transparent;
81
+ --bms-button-hover-border-color: #{color($colorName, '140')};
82
+ --bms-button-hover-text-color: #{color($colorName, '140')};
83
+
84
+ --bms-button-disabled-background-color: transparent;
85
+ --bms-button-disabled-border-color: var(--bms-disabled-color);
86
+ --bms-button-disabled-text-color: var(--bms-disabled-color);
87
+ }
88
+
89
+ &.bms-button--ghost {
90
+ --bms-button-background-color: transparent;
91
+ --bms-button-border-color: transparent;
92
+ --bms-button-text-color: #{color($colorName)};
93
+
94
+ --bms-button-hover-background-color: #{color($colorName, '10')};
95
+ --bms-button-hover-border-color: transparent;
96
+ --bms-button-hover-text-color: #{color($colorName, '140')};
97
+
98
+ --bms-button-disabled-background-color: transparent;
99
+ --bms-button-disabled-border-color: transparent;
100
+ --bms-button-disabled-text-color: var(--bms-disabled-color);
101
+ }
102
+ }
103
+
104
+ @mixin useColors() {
105
+ background-color: var(--bms-button-background-color);
106
+ border: 1px solid var(--bms-button-border-color);
107
+ color: var(--bms-button-text-color);
108
+
109
+ &:focus,
110
+ &:active,
111
+ &:hover,
112
+ &._hover {
113
+ background-color: var(--bms-button-hover-background-color);
114
+ border-color: var(--bms-button-hover-border-color);
115
+ color: var(--bms-button-hover-text-color);
116
+ outline: none;
117
+ text-decoration: none;
118
+ }
119
+ &:disabled,
120
+ &.bms-button--disabled {
121
+ background-color: var(--bms-button-disabled-background-color);
122
+ border-color: var(--bms-button-disabled-border-color);
123
+ color: var(--bms-button-disabled-text-color);
124
+ pointer-events: none;
125
+ cursor: initial;
126
+ }
127
+ }
128
+
129
+ .bms-button {
130
+ height: 2em;
131
+ font-size: 1em;
132
+
133
+ box-sizing: border-box;
134
+ display: inline-flex;
135
+ align-items: center;
136
+ margin: 0;
137
+ padding: 0.5em;
138
+ appearance: none;
139
+ cursor: pointer;
140
+ border-radius: var(--bms-border-radius);
141
+ line-height: 1;
142
+ justify-content: center;
143
+ text-align: center;
144
+ transition:
145
+ transform 0.1s ease-in-out,
146
+ background-color 0.1s linear,
147
+ color 0.1s linear,
148
+ border 0.1s linear;
149
+ text-decoration: none;
150
+
151
+ @include useColors();
152
+ @include selectColorsToApply('grey');
153
+
154
+ .content {
155
+ margin: 0 0.5em;
156
+ }
157
+
158
+ > span {
159
+ &:empty {
160
+ display: none;
161
+ }
162
+ }
163
+
164
+ svg {
165
+ display: block;
166
+ width: 1em;
167
+ height: 1em;
168
+ }
169
+
170
+ &.is-default {
171
+ @include selectColorsToApply('main');
172
+ }
173
+
174
+ &.is-warning {
175
+ @include selectColorsToApply('orange');
176
+ }
177
+
178
+ &.is-danger {
179
+ @include selectColorsToApply('red');
180
+ }
181
+
182
+ &.is-success {
183
+ @include selectColorsToApply('green');
184
+ }
185
+ }
186
+ </style>
@@ -0,0 +1,75 @@
1
+ import BmsAlert from './BmsAlert.vue';
2
+ import BmsButton from '../button/BmsButton.vue';
3
+ import { StatusType } from '@/models/status-type.model';
4
+
5
+ export default {
6
+ title: 'shared/BmsAlert',
7
+ component: BmsAlert,
8
+ };
9
+
10
+ const Template = (args) => ({
11
+ components: {
12
+ BmsAlert,
13
+ },
14
+ setup() {
15
+ return { args };
16
+ },
17
+ template: `
18
+ <BmsAlert v-bind="args"/>
19
+ `,
20
+ });
21
+
22
+ export const Default = Template.bind({});
23
+ Default.args = {
24
+ message:
25
+ 'Alas! If our impulses were confined to hunger, thirst, and desire, we might be nearly free; but now we are moved by every wind that blows and a chance word or scene that that word may convey to us.',
26
+ };
27
+
28
+ export const NonDismissable = Template.bind({});
29
+ NonDismissable.args = {
30
+ dismissable: false,
31
+ message:
32
+ 'Alas! Why does man boast of sensibilities superior to those apparent in the brute; it only renders them more necessary beings. If our impulses were confined to hunger, thirst, and desire, we might be nearly free; but now we are moved by every wind that blows and a chance word or scene that that word may convey to us.',
33
+ };
34
+
35
+ export const Danger = Template.bind({});
36
+ Danger.args = {
37
+ type: StatusType.Danger,
38
+ message:
39
+ 'Alas! If our impulses were confined to hunger, thirst, and desire, we might be nearly free; but now we are moved by every wind that blows and a chance word or scene that that word may convey to us.',
40
+ };
41
+
42
+ export const Warning = Template.bind({});
43
+ Warning.args = {
44
+ type: StatusType.Warning,
45
+ message:
46
+ 'Alas! If our impulses were confined to hunger, thirst, and desire, we might be nearly free; but now we are moved by every wind that blows and a chance word or scene that that word may convey to us.',
47
+ };
48
+
49
+ const TemplateWithSlots = (args) => ({
50
+ components: {
51
+ BmsAlert,
52
+ BmsButton,
53
+ },
54
+ setup() {
55
+ return { args };
56
+ },
57
+ template: `
58
+ <BmsAlert v-bind="args">
59
+ {{args.slots.subtitle}}
60
+ <template #action v-if="args.slots.alertAction">
61
+ <BmsButton>{{args.slots.alertAction}}</BmsButton>
62
+ </template>
63
+ </BmsAlert>
64
+ `,
65
+ });
66
+ export const WithSlots = TemplateWithSlots.bind({});
67
+ WithSlots.args = {
68
+ message:
69
+ 'Alas! If our impulses were confined to hunger, thirst, and desire, we might be nearly free;',
70
+ slots: {
71
+ subtitle:
72
+ 'but now we are moved by every wind that blows and a chance word or scene that that word may convey to us.',
73
+ alertAction: 'ACTION',
74
+ },
75
+ };
@@ -0,0 +1,91 @@
1
+ <template>
2
+ <div class="alert" :class="`alert-${props.type}`">
3
+ <div class="info-line">
4
+ <span class="icon"><component :is="alertIcon" :size="20" /></span>
5
+ <span class="message">
6
+ <slot name="message">
7
+ <strong>{{ message }}</strong>
8
+ </slot>
9
+ </span>
10
+ <slot name="action"></slot>
11
+ <BmsIconButton v-if="dismissable" @click="emits('dismiss')">
12
+ <X :size="20" />
13
+ </BmsIconButton>
14
+ </div>
15
+ <slot name="default"></slot>
16
+ </div>
17
+ </template>
18
+
19
+ <script lang="ts" setup>
20
+ import { AlertCircle, AlertTriangle, Info, X } from 'lucide-vue-next';
21
+ import BmsIconButton from '../button/BmsIconButton.vue';
22
+ import { type Component, ComputedRef, computed } from 'vue';
23
+ import { StatusType } from '@/models/status-type.model';
24
+
25
+ const props = withDefaults(
26
+ defineProps<{ message?: string; dismissable?: boolean; type?: StatusType }>(),
27
+ {
28
+ dismissable: true,
29
+ type: StatusType.Information,
30
+ },
31
+ );
32
+
33
+ const emits = defineEmits<{
34
+ (e: 'dismiss'): void;
35
+ }>();
36
+
37
+ const alertIcon: ComputedRef<Component> = computed(() => {
38
+ switch (props.type) {
39
+ case StatusType.Danger:
40
+ return AlertCircle;
41
+ case StatusType.Warning:
42
+ return AlertTriangle;
43
+ default:
44
+ return Info;
45
+ }
46
+ });
47
+ </script>
48
+
49
+ <style lang="scss" scoped>
50
+ .alert {
51
+ --alert-main-color: var(--bms-main-100);
52
+ --alert-secondary-color: var(--bms-main-10);
53
+
54
+ background-color: var(--alert-secondary-color);
55
+ border-radius: 8px;
56
+ border: 1px solid var(--alert-main-color);
57
+ padding: 16px;
58
+
59
+ &-information {
60
+ --alert-main-color: var(--bms-main-100);
61
+ --alert-secondary-color: var(--bms-main-10);
62
+ }
63
+
64
+ &-danger {
65
+ --alert-main-color: var(--bms-red-100);
66
+ --alert-secondary-color: var(--bms-red-10);
67
+ }
68
+
69
+ &-warning {
70
+ --alert-main-color: var(--bms-orange-100);
71
+ --alert-secondary-color: var(--bms-orange-10);
72
+ }
73
+
74
+ .info-line {
75
+ display: flex;
76
+ flex-wrap: nowrap;
77
+ gap: 16px;
78
+ align-items: baseline;
79
+
80
+ .icon {
81
+ color: var(--alert-main-color);
82
+ display: flex;
83
+ }
84
+
85
+ .message {
86
+ flex-grow: 1;
87
+ align-self: center;
88
+ }
89
+ }
90
+ }
91
+ </style>
@@ -0,0 +1,34 @@
1
+ import BmsBadge from './BmsBadge.vue';
2
+ import { StatusType } from '../../models';
3
+
4
+ export default {
5
+ title: 'Composants/feedback/BmsBadge',
6
+ component: BmsBadge,
7
+ };
8
+
9
+ const Template = (args) => ({
10
+ components: {
11
+ BmsBadge,
12
+ },
13
+ setup() {
14
+ return { args };
15
+ },
16
+ template: `
17
+ <br><b>Default</b><br>
18
+ <BmsBadge v-bind="{pending:42}"><a>500</a></BmsBadge>
19
+ <br>
20
+ <br><b>Not pending</b><br>
21
+ <BmsBadge v-bind="{pending:0}"><a>500</a></BmsBadge>
22
+ <br>
23
+ <br> <b>Danger</b><br>
24
+ <BmsBadge v-bind="{pending:42,color:'danger'}"><a>500</a></BmsBadge>
25
+ <br>
26
+ <br> <b>Too small and warn</b><br>
27
+ <BmsBadge v-bind="{pending:1,color:'warning'}"><a>500</a></BmsBadge>
28
+ <br>
29
+ <br> <b>Too long and default color</b><br>
30
+ <BmsBadge v-bind="{pending:666,color:'default'}"><a>what ever you want here</a></BmsBadge>
31
+ `,
32
+ });
33
+
34
+ export const BmsBadgeStory = Template.bind({});