@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.
- package/README.md +280 -0
- package/dist/assets/animated-icons/AnimatedActivityIcon.vue.d.ts +133 -0
- package/dist/assets/animated-icons/AnimatedCircleHelpIcon.vue.d.ts +133 -0
- package/dist/assets/animated-icons/AnimatedHomeIcon.vue.d.ts +133 -0
- package/dist/components/button/BmsButton.spec.d.ts +1 -0
- package/dist/components/button/BmsButton.vue.d.ts +24 -0
- package/dist/components/button/BmsIconButton.vue.d.ts +23 -0
- package/dist/components/button/UiButton.vue.d.ts +26 -0
- package/dist/components/button/UiButtonLink.vue.d.ts +20 -0
- package/dist/components/feedback/BmsAlert.vue.d.ts +24 -0
- package/dist/components/feedback/BmsBadge.vue.d.ts +18 -0
- package/dist/components/feedback/BmsCaption.vue.d.ts +6 -0
- package/dist/components/feedback/BmsCircularProgress.spec.d.ts +1 -0
- package/dist/components/feedback/BmsCircularProgress.vue.d.ts +6 -0
- package/dist/components/feedback/BmsLoader.spec.d.ts +1 -0
- package/dist/components/feedback/BmsLoader.vue.d.ts +9 -0
- package/dist/components/feedback/BmsTooltip.vue.d.ts +28 -0
- package/dist/components/feedback/UiTooltip.spec.d.ts +1 -0
- package/dist/components/feedback/UiTooltip.vue.d.ts +27 -0
- package/dist/components/feedback/tooltip.helper.d.ts +45 -0
- package/dist/components/feedback/tooltip.helper.spec.d.ts +1 -0
- package/dist/components/form/BmsAutocomplete.vue.d.ts +31 -0
- package/dist/components/form/BmsBetweenInput.vue.d.ts +32 -0
- package/dist/components/form/BmsChip.vue.d.ts +15 -0
- package/dist/components/form/BmsFilePicker.spec.d.ts +1 -0
- package/dist/components/form/BmsFilePicker.vue.d.ts +12 -0
- package/dist/components/form/BmsInputBooleanCheckbox.vue.d.ts +30 -0
- package/dist/components/form/BmsInputCheckboxCaption.spec.d.ts +1 -0
- package/dist/components/form/BmsInputCheckboxCaption.vue.d.ts +31 -0
- package/dist/components/form/BmsInputCheckboxCaptionGroup.vue.d.ts +25 -0
- package/dist/components/form/BmsInputCheckboxGroup.vue.d.ts +24 -0
- package/dist/components/form/BmsInputCode.vue.d.ts +27 -0
- package/dist/components/form/BmsInputDateTime.vue.d.ts +24 -0
- package/dist/components/form/BmsInputFile.spec.d.ts +1 -0
- package/dist/components/form/BmsInputFile.vue.d.ts +27 -0
- package/dist/components/form/BmsInputNumber.spec.d.ts +1 -0
- package/dist/components/form/BmsInputNumber.vue.d.ts +26 -0
- package/dist/components/form/BmsInputRadio.vue.d.ts +28 -0
- package/dist/components/form/BmsInputRadioCaption.vue.d.ts +30 -0
- package/dist/components/form/BmsInputRadioCaptionGroup.vue.d.ts +30 -0
- package/dist/components/form/BmsInputRadioGroup.vue.d.ts +30 -0
- package/dist/components/form/BmsInputText.spec.d.ts +1 -0
- package/dist/components/form/BmsInputText.vue.d.ts +128 -0
- package/dist/components/form/BmsInputToggle.vue.d.ts +15 -0
- package/dist/components/form/BmsSearch.spec.d.ts +1 -0
- package/dist/components/form/BmsSearch.vue.d.ts +187 -0
- package/dist/components/form/BmsSelect.spec.d.ts +1 -0
- package/dist/components/form/BmsSelect.vue.d.ts +34 -0
- package/dist/components/form/BmsTag.vue.d.ts +25 -0
- package/dist/components/form/BmsTextArea.spec.d.ts +1 -0
- package/dist/components/form/BmsTextArea.vue.d.ts +26 -0
- package/dist/components/form/RawAutocomplete.spec.d.ts +1 -0
- package/dist/components/form/RawAutocomplete.vue.d.ts +130 -0
- package/dist/components/form/RawInputText.vue.d.ts +42 -0
- package/dist/components/form/UiBmsInputCheckbox.vue.d.ts +28 -0
- package/dist/components/form/UiBmsSwitch.vue.d.ts +14 -0
- package/dist/components/layout/BmsCard.vue.d.ts +21 -0
- package/dist/components/layout/BmsContentPageLayout.vue.d.ts +17 -0
- package/dist/components/layout/BmsForm.vue.d.ts +7 -0
- package/dist/components/layout/BmsHeader.vue.d.ts +9 -0
- package/dist/components/layout/BmsHeaderTitle.vue.d.ts +22 -0
- package/dist/components/layout/BmsModal.spec.d.ts +1 -0
- package/dist/components/layout/BmsModal.vue.d.ts +60 -0
- package/dist/components/layout/BmsOverlay.vue.d.ts +13 -0
- package/dist/components/layout/BmsSection.vue.d.ts +15 -0
- package/dist/components/layout/BmsStep.vue.d.ts +27 -0
- package/dist/components/layout/BmsStepper.vue.d.ts +13 -0
- package/dist/components/layout/UiPopoverMenu.vue.d.ts +23 -0
- package/dist/components/navigation/BmsBackButton.vue.d.ts +13 -0
- package/dist/components/navigation/BmsBreadcrumb.vue.d.ts +12 -0
- package/dist/components/navigation/BmsLink.spec.d.ts +1 -0
- package/dist/components/navigation/BmsLink.vue.d.ts +22 -0
- package/dist/components/navigation/BmsMenu.spec.d.ts +1 -0
- package/dist/components/navigation/BmsMenu.vue.d.ts +21 -0
- package/dist/components/navigation/BmsMenuNav.spec.d.ts +1 -0
- package/dist/components/navigation/BmsMenuNav.vue.d.ts +23 -0
- package/dist/components/navigation/BmsShortLinkMenu.vue.d.ts +20 -0
- package/dist/components/navigation/BmsTabs.vue.d.ts +7 -0
- package/dist/components/navigation/BmsTenantSwitcher.vue.d.ts +22 -0
- package/dist/components/navigation/UiMenuItem.vue.d.ts +11 -0
- package/dist/components/navigation/UiTab.vue.d.ts +15 -0
- package/dist/components/navigation/UiTenantImage.vue.d.ts +6 -0
- package/dist/components/navigation/UiTenantLabel.vue.d.ts +12 -0
- package/dist/components/navigation/UiTenantSwitcher.spec.d.ts +1 -0
- package/dist/components/navigation/UiTenantSwitcher.vue.d.ts +189 -0
- package/dist/components/table/BmsEmptyScreen.vue.d.ts +6 -0
- package/dist/components/table/BmsPagination.spec.d.ts +1 -0
- package/dist/components/table/BmsPagination.vue.d.ts +35 -0
- package/dist/components/table/BmsServerTable.vue.d.ts +74 -0
- package/dist/components/table/BmsTable.spec.d.ts +1 -0
- package/dist/components/table/BmsTable.vue.d.ts +53 -0
- package/dist/components/table/BmsTableFilters.spec.d.ts +1 -0
- package/dist/components/table/BmsTableFilters.vue.d.ts +188 -0
- package/dist/components/table/DraggableList.vue.d.ts +26 -0
- package/dist/components/table/UiBmsTable.spec.d.ts +1 -0
- package/dist/components/table/UiBmsTable.vue.d.ts +66 -0
- package/dist/components/table/UiFilterButton.vue.d.ts +13 -0
- package/dist/components/utils/BmsCocarde.vue.d.ts +11 -0
- package/dist/components/utils/BmsProblem.vue.d.ts +9 -0
- package/dist/components/utils/BmsRelativeTime.spec.d.ts +1 -0
- package/dist/components/utils/BmsRelativeTime.vue.d.ts +11 -0
- package/dist/composables/clipboard.composable.d.ts +3 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/pagination.composable.d.ts +14 -0
- package/dist/composables/pagination.composable.spec.d.ts +1 -0
- package/dist/composables/search.composable.d.ts +52 -0
- package/dist/composables/search.composable.spec.d.ts +1 -0
- package/dist/composables/search.helper.d.ts +7 -0
- package/dist/composables/search.helper.spec.d.ts +1 -0
- package/dist/composables/sort.composable.d.ts +10 -0
- package/dist/composables/sort.composable.spec.d.ts +1 -0
- package/dist/composables/userPref.composable.d.ts +6 -0
- package/dist/composables/userPref.composable.spec.d.ts +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/helpers/cocarde.helper.d.ts +1 -0
- package/dist/helpers/cocarde.helper.spec.d.ts +1 -0
- package/dist/helpers/date.helper.d.ts +26 -0
- package/dist/helpers/date.helper.spec.d.ts +1 -0
- package/dist/helpers/file.helper.d.ts +5 -0
- package/dist/helpers/file.helper.spec.d.ts +1 -0
- package/dist/helpers/index.d.ts +6 -0
- package/dist/helpers/location.helper.d.ts +10 -0
- package/dist/helpers/location.helper.spec.d.ts +1 -0
- package/dist/helpers/problem.helper.d.ts +1 -0
- package/dist/helpers/problem.helper.spec.d.ts +1 -0
- package/dist/helpers/string.helper.d.ts +9 -0
- package/dist/helpers/string.helper.spec.d.ts +1 -0
- package/dist/helpers/table.helper.d.ts +16 -0
- package/dist/helpers/table.helper.spec.d.ts +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/logo.png +0 -0
- package/dist/main.d.ts +0 -0
- package/dist/mockServiceWorker.js +344 -0
- package/dist/models/breadcrumb.model.d.ts +5 -0
- package/dist/models/caption.model.d.ts +6 -0
- package/dist/models/chip.model.d.ts +8 -0
- package/dist/models/cocarde.model.d.ts +4 -0
- package/dist/models/form.model.d.ts +25 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/menu.model.d.ts +18 -0
- package/dist/models/modal.model.d.ts +8 -0
- package/dist/models/problem.model.d.ts +14 -0
- package/dist/models/sort.model.d.ts +11 -0
- package/dist/models/status-type.model.d.ts +7 -0
- package/dist/models/tab.model.d.ts +7 -0
- package/dist/models/table.model.d.ts +53 -0
- package/dist/models/tenant.model.d.ts +7 -0
- package/dist/models/tooltip.model.d.ts +6 -0
- package/dist/plugins/confirm/index.d.ts +9 -0
- package/dist/plugins/feature-flipper/FeatureFlipper.vue.d.ts +9 -0
- package/dist/plugins/feature-flipper/FeatureFlipperIndicator.vue.d.ts +6 -0
- package/dist/plugins/feature-flipper/FeatureFlipperModal.vue.d.ts +16 -0
- package/dist/plugins/feature-flipper/featureFlipper.composable.d.ts +10 -0
- package/dist/plugins/feature-flipper/featureFlipper.composable.spec.d.ts +1 -0
- package/dist/plugins/feature-flipper/featureFlipper.model.d.ts +3 -0
- package/dist/plugins/feature-flipper/index.d.ts +4 -0
- package/dist/plugins/field/FieldComponent.spec.d.ts +1 -0
- package/dist/plugins/field/FieldComponent.vue.d.ts +25 -0
- package/dist/plugins/field/FieldDatalist.vue.d.ts +27 -0
- package/dist/plugins/field/index.d.ts +2 -0
- package/dist/plugins/keycloak-auth-adapter/index.d.ts +20 -0
- package/dist/plugins/notifications/NotificationItem.vue.d.ts +12 -0
- package/dist/plugins/notifications/NotificationWidget.vue.d.ts +2 -0
- package/dist/plugins/notifications/index.d.ts +11 -0
- package/dist/plugins/notifications/notification.model.d.ts +20 -0
- package/dist/plugins/router-history/index.d.ts +6 -0
- package/dist/plugins/router-history/router-history.composable.d.ts +7 -0
- package/dist/plugins/router-history/router-history.composable.spec.d.ts +1 -0
- package/dist/plugins/runtime-env/index.d.ts +7 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/services/konami.service.d.ts +2 -0
- package/dist/showroom/App.vue.d.ts +2 -0
- package/dist/showroom/router.d.ts +8 -0
- package/dist/sipa-bms-ui.css +3024 -0
- package/dist/sipa-bms-ui.es.js +102694 -0
- package/dist/sipa-bms-ui.es.js.map +1 -0
- package/dist/sipa-bms-ui.umd.js +102815 -0
- package/dist/sipa-bms-ui.umd.js.map +1 -0
- package/package.json +126 -0
- package/src/assets/animated-icons/AnimatedActivityIcon.vue +77 -0
- package/src/assets/animated-icons/AnimatedCircleHelpIcon.vue +67 -0
- package/src/assets/animated-icons/AnimatedHomeIcon.vue +69 -0
- package/src/assets/empty.svg +1 -0
- package/src/assets/scss/_conf.scss +203 -0
- package/src/assets/scss/_formkit.scss +353 -0
- package/src/assets/scss/app.scss +11 -0
- package/src/assets/scss/global-variables.scss +56 -0
- package/src/components/button/BmsAllButtons.stories.js +56 -0
- package/src/components/button/BmsButton.spec.ts +37 -0
- package/src/components/button/BmsButton.stories.js +84 -0
- package/src/components/button/BmsButton.vue +50 -0
- package/src/components/button/BmsIconButton.stories.js +67 -0
- package/src/components/button/BmsIconButton.vue +34 -0
- package/src/components/button/UiButton.stories.js +131 -0
- package/src/components/button/UiButton.vue +37 -0
- package/src/components/button/UiButtonLink.vue +186 -0
- package/src/components/feedback/BmsAlert.stories.js +75 -0
- package/src/components/feedback/BmsAlert.vue +91 -0
- package/src/components/feedback/BmsBadge.stories.js +34 -0
- package/src/components/feedback/BmsBadge.vue +76 -0
- package/src/components/feedback/BmsCaption.stories.js +59 -0
- package/src/components/feedback/BmsCaption.vue +88 -0
- package/src/components/feedback/BmsCircularProgress.spec.ts +14 -0
- package/src/components/feedback/BmsCircularProgress.stories.js +45 -0
- package/src/components/feedback/BmsCircularProgress.vue +64 -0
- package/src/components/feedback/BmsLoader.spec.ts +7 -0
- package/src/components/feedback/BmsLoader.stories.js +31 -0
- package/src/components/feedback/BmsLoader.vue +82 -0
- package/src/components/feedback/BmsTooltip.stories.js +65 -0
- package/src/components/feedback/BmsTooltip.vue +102 -0
- package/src/components/feedback/Notification.stories.js +37 -0
- package/src/components/feedback/UiTooltip.spec.ts +62 -0
- package/src/components/feedback/UiTooltip.stories.js +71 -0
- package/src/components/feedback/UiTooltip.vue +219 -0
- package/src/components/feedback/tooltip.helper.spec.ts +92 -0
- package/src/components/feedback/tooltip.helper.ts +121 -0
- package/src/components/form/BmsAutocomplete.stories.js +90 -0
- package/src/components/form/BmsAutocomplete.vue +100 -0
- package/src/components/form/BmsBetweenInput.stories.js +69 -0
- package/src/components/form/BmsBetweenInput.vue +146 -0
- package/src/components/form/BmsChip.stories.js +65 -0
- package/src/components/form/BmsChip.vue +92 -0
- package/src/components/form/BmsFilePicker.spec.ts +94 -0
- package/src/components/form/BmsFilePicker.stories.js +53 -0
- package/src/components/form/BmsFilePicker.vue +186 -0
- package/src/components/form/BmsInputBooleanCheckbox.stories.js +90 -0
- package/src/components/form/BmsInputBooleanCheckbox.vue +70 -0
- package/src/components/form/BmsInputCheckboxCaption.spec.ts +45 -0
- package/src/components/form/BmsInputCheckboxCaption.stories.js +92 -0
- package/src/components/form/BmsInputCheckboxCaption.vue +126 -0
- package/src/components/form/BmsInputCheckboxCaptionGroup.stories.js +153 -0
- package/src/components/form/BmsInputCheckboxCaptionGroup.vue +81 -0
- package/src/components/form/BmsInputCheckboxGroup.stories.js +94 -0
- package/src/components/form/BmsInputCheckboxGroup.vue +94 -0
- package/src/components/form/BmsInputCode.stories.js +43 -0
- package/src/components/form/BmsInputCode.vue +71 -0
- package/src/components/form/BmsInputDateTime.stories.js +71 -0
- package/src/components/form/BmsInputDateTime.vue +55 -0
- package/src/components/form/BmsInputFile.spec.ts +90 -0
- package/src/components/form/BmsInputFile.stories.js +156 -0
- package/src/components/form/BmsInputFile.vue +310 -0
- package/src/components/form/BmsInputNumber.spec.ts +40 -0
- package/src/components/form/BmsInputNumber.stories.js +79 -0
- package/src/components/form/BmsInputNumber.vue +67 -0
- package/src/components/form/BmsInputRadio.stories.js +79 -0
- package/src/components/form/BmsInputRadio.vue +121 -0
- package/src/components/form/BmsInputRadioCaption.stories.js +98 -0
- package/src/components/form/BmsInputRadioCaption.vue +110 -0
- package/src/components/form/BmsInputRadioCaptionGroup.stories.js +166 -0
- package/src/components/form/BmsInputRadioCaptionGroup.vue +81 -0
- package/src/components/form/BmsInputRadioGroup.stories.js +108 -0
- package/src/components/form/BmsInputRadioGroup.vue +93 -0
- package/src/components/form/BmsInputText.spec.ts +37 -0
- package/src/components/form/BmsInputText.stories.js +78 -0
- package/src/components/form/BmsInputText.vue +79 -0
- package/src/components/form/BmsInputToggle.stories.js +37 -0
- package/src/components/form/BmsInputToggle.vue +66 -0
- package/src/components/form/BmsSearch.spec.ts +41 -0
- package/src/components/form/BmsSearch.stories.js +70 -0
- package/src/components/form/BmsSearch.vue +62 -0
- package/src/components/form/BmsSelect.spec.ts +57 -0
- package/src/components/form/BmsSelect.stories.js +131 -0
- package/src/components/form/BmsSelect.vue +225 -0
- package/src/components/form/BmsTag.stories.js +64 -0
- package/src/components/form/BmsTag.vue +109 -0
- package/src/components/form/BmsTextArea.spec.ts +37 -0
- package/src/components/form/BmsTextArea.stories.js +74 -0
- package/src/components/form/BmsTextArea.vue +112 -0
- package/src/components/form/Form.stories.js +35 -0
- package/src/components/form/RawAutocomplete.spec.ts +103 -0
- package/src/components/form/RawAutocomplete.vue +218 -0
- package/src/components/form/RawInputText.vue +173 -0
- package/src/components/form/UiBmsInputCheckbox.stories.js +77 -0
- package/src/components/form/UiBmsInputCheckbox.vue +126 -0
- package/src/components/form/UiBmsSwitch.stories.js +40 -0
- package/src/components/form/UiBmsSwitch.vue +80 -0
- package/src/components/layout/BmsCard.stories.js +77 -0
- package/src/components/layout/BmsCard.vue +133 -0
- package/src/components/layout/BmsContentPageLayout.vue +92 -0
- package/src/components/layout/BmsForm.stories.js +30 -0
- package/src/components/layout/BmsForm.vue +42 -0
- package/src/components/layout/BmsHeader.stories.js +29 -0
- package/src/components/layout/BmsHeader.vue +16 -0
- package/src/components/layout/BmsHeaderTitle.stories.js +68 -0
- package/src/components/layout/BmsHeaderTitle.vue +76 -0
- package/src/components/layout/BmsModal.spec.ts +174 -0
- package/src/components/layout/BmsModal.stories.js +153 -0
- package/src/components/layout/BmsModal.vue +359 -0
- package/src/components/layout/BmsOverlay.stories.js +34 -0
- package/src/components/layout/BmsOverlay.vue +28 -0
- package/src/components/layout/BmsSection.stories.js +45 -0
- package/src/components/layout/BmsSection.vue +35 -0
- package/src/components/layout/BmsStep.stories.js +71 -0
- package/src/components/layout/BmsStep.vue +60 -0
- package/src/components/layout/BmsStepper.stories.js +57 -0
- package/src/components/layout/BmsStepper.vue +195 -0
- package/src/components/layout/UiPopoverMenu.vue +167 -0
- package/src/components/navigation/BmsBackButton.stories.js +27 -0
- package/src/components/navigation/BmsBackButton.vue +38 -0
- package/src/components/navigation/BmsBreadcrumb.stories.js +80 -0
- package/src/components/navigation/BmsBreadcrumb.vue +45 -0
- package/src/components/navigation/BmsLink.spec.ts +45 -0
- package/src/components/navigation/BmsLink.vue +59 -0
- package/src/components/navigation/BmsMenu.spec.ts +95 -0
- package/src/components/navigation/BmsMenu.stories.js +85 -0
- package/src/components/navigation/BmsMenu.vue +148 -0
- package/src/components/navigation/BmsMenuNav.spec.ts +140 -0
- package/src/components/navigation/BmsMenuNav.stories.js +187 -0
- package/src/components/navigation/BmsMenuNav.vue +217 -0
- package/src/components/navigation/BmsShortLinkMenu.stories.js +55 -0
- package/src/components/navigation/BmsShortLinkMenu.vue +59 -0
- package/src/components/navigation/BmsTabs.stories.js +30 -0
- package/src/components/navigation/BmsTabs.vue +46 -0
- package/src/components/navigation/BmsTenantSwitcher.stories.js +89 -0
- package/src/components/navigation/BmsTenantSwitcher.vue +135 -0
- package/src/components/navigation/UiMenuItem.stories.js +73 -0
- package/src/components/navigation/UiMenuItem.vue +116 -0
- package/src/components/navigation/UiMenuItemStatus.stories.js +58 -0
- package/src/components/navigation/UiTab.stories.js +56 -0
- package/src/components/navigation/UiTab.vue +71 -0
- package/src/components/navigation/UiTenantImage.vue +22 -0
- package/src/components/navigation/UiTenantLabel.vue +94 -0
- package/src/components/navigation/UiTenantSwitcher.spec.ts +167 -0
- package/src/components/navigation/UiTenantSwitcher.stories.js +70 -0
- package/src/components/navigation/UiTenantSwitcher.vue +161 -0
- package/src/components/table/BmsEmptyScreen.stories.js +32 -0
- package/src/components/table/BmsEmptyScreen.vue +54 -0
- package/src/components/table/BmsPagination.spec.ts +73 -0
- package/src/components/table/BmsPagination.stories.js +34 -0
- package/src/components/table/BmsPagination.vue +154 -0
- package/src/components/table/BmsServerTable.stories.js +422 -0
- package/src/components/table/BmsServerTable.vue +402 -0
- package/src/components/table/BmsTable.spec.ts +309 -0
- package/src/components/table/BmsTable.stories.js +930 -0
- package/src/components/table/BmsTable.vue +308 -0
- package/src/components/table/BmsTableFilters.spec.ts +494 -0
- package/src/components/table/BmsTableFilters.stories.js +114 -0
- package/src/components/table/BmsTableFilters.vue +268 -0
- package/src/components/table/DraggableList.stories.js +29 -0
- package/src/components/table/DraggableList.vue +179 -0
- package/src/components/table/UiBmsTable.spec.ts +373 -0
- package/src/components/table/UiBmsTable.stories.js +563 -0
- package/src/components/table/UiBmsTable.vue +617 -0
- package/src/components/table/UiFilterButton.stories.js +37 -0
- package/src/components/table/UiFilterButton.vue +85 -0
- package/src/components/utils/BmsCocarde.stories.js +47 -0
- package/src/components/utils/BmsCocarde.vue +66 -0
- package/src/components/utils/BmsProblem.stories.js +82 -0
- package/src/components/utils/BmsProblem.vue +223 -0
- package/src/components/utils/BmsRelativeTime.spec.ts +41 -0
- package/src/components/utils/BmsRelativeTime.stories.js +48 -0
- package/src/components/utils/BmsRelativeTime.vue +57 -0
- package/src/composables/clipboard.composable.ts +14 -0
- package/src/composables/index.ts +5 -0
- package/src/composables/pagination.composable.spec.ts +258 -0
- package/src/composables/pagination.composable.ts +111 -0
- package/src/composables/search.composable.spec.ts +1296 -0
- package/src/composables/search.composable.ts +316 -0
- package/src/composables/search.helper.spec.ts +339 -0
- package/src/composables/search.helper.ts +103 -0
- package/src/composables/sort.composable.spec.ts +349 -0
- package/src/composables/sort.composable.ts +129 -0
- package/src/composables/userPref.composable.spec.ts +115 -0
- package/src/composables/userPref.composable.ts +43 -0
- package/src/documentation/ColorTile.vue +23 -0
- package/src/documentation/assets/BmsIcon.png +0 -0
- package/src/documentation/assets/CoverBmsUI.png +0 -0
- package/src/documentation/assets/button/CoverPrimaryButton.png +0 -0
- package/src/documentation/assets/button/CoverSecondaryButton.png +0 -0
- package/src/documentation/assets/button/DoButtonLabel.png +0 -0
- package/src/documentation/assets/button/DontButtonLabel.png +0 -0
- package/src/documentation/assets/button/PrimaryButtonRepresentation.png +0 -0
- package/src/documentation/assets/cards/CardRepresentation.png +0 -0
- package/src/documentation/assets/cards/CoverCard.png +0 -0
- package/src/documentation/assets/chip/ChipRepresentation.png +0 -0
- package/src/documentation/assets/chip/CoverChips.png +0 -0
- package/src/documentation/assets/fields/Anatomy.png +0 -0
- package/src/documentation/assets/fields/CaptionRepresentation.png +0 -0
- package/src/documentation/assets/fields/CaptionTextRepresentation.png +0 -0
- package/src/documentation/assets/fields/CoverFieldsAnatomy.png +0 -0
- package/src/documentation/assets/fields/CoverInputFile.png +0 -0
- package/src/documentation/assets/fields/CoverInputText.png +0 -0
- package/src/documentation/assets/fields/CoverRadioCaptionGroup.png +0 -0
- package/src/documentation/assets/fields/CoverRadioGroup.png +0 -0
- package/src/documentation/assets/fields/CoverSearch.png +0 -0
- package/src/documentation/assets/fields/CoverSelect.png +0 -0
- package/src/documentation/assets/fields/CoverTextArea.png +0 -0
- package/src/documentation/assets/fields/FieldLabel.png +0 -0
- package/src/documentation/assets/fields/InputMediaRepresentation.png +0 -0
- package/src/documentation/assets/fields/InputRepresentation.png +0 -0
- package/src/documentation/assets/fields/InputSearchRepresentation.png +0 -0
- package/src/documentation/assets/fields/InputText.png +0 -0
- package/src/documentation/assets/fields/InputTextAreaRepresentation.png +0 -0
- package/src/documentation/assets/fields/LabelDo.png +0 -0
- package/src/documentation/assets/fields/LabelDont.png +0 -0
- package/src/documentation/assets/fields/LabelRepresentation.png +0 -0
- package/src/documentation/assets/fields/RadioCaptionGroupRepresentation.png +0 -0
- package/src/documentation/assets/fields/RadioGroupRepresentation.png +0 -0
- package/src/documentation/assets/fields/SelectRepresentation.png +0 -0
- package/src/documentation/assets/tag/CoverTag.png +0 -0
- package/src/documentation/assets/tag/TagRepresentation.png +0 -0
- package/src/documentation/button.mdx +24 -0
- package/src/documentation/card.mdx +28 -0
- package/src/documentation/chip.mdx +28 -0
- package/src/documentation/colors.mdx +118 -0
- package/src/documentation/fields.mdx +52 -0
- package/src/documentation/fields_text.mdx +31 -0
- package/src/documentation/icons.mdx +33 -0
- package/src/documentation/inputFile.mdx +28 -0
- package/src/documentation/primaryButton.mdx +20 -0
- package/src/documentation/principles.mdx +23 -0
- package/src/documentation/radioCaptionGroup.mdx +34 -0
- package/src/documentation/radioGroup.mdx +34 -0
- package/src/documentation/search.mdx +28 -0
- package/src/documentation/secondaryButton.mdx +17 -0
- package/src/documentation/select.mdx +31 -0
- package/src/documentation/tag.mdx +28 -0
- package/src/documentation/template_field_dependency.mdx +19 -0
- package/src/documentation/textArea.mdx +27 -0
- package/src/documentation/typography.mdx +93 -0
- package/src/documentation/typography.stories.js +26 -0
- package/src/helpers/cocarde.helper.spec.ts +14 -0
- package/src/helpers/cocarde.helper.ts +22 -0
- package/src/helpers/date.helper.spec.ts +91 -0
- package/src/helpers/date.helper.ts +105 -0
- package/src/helpers/file.helper.spec.ts +60 -0
- package/src/helpers/file.helper.ts +24 -0
- package/src/helpers/index.ts +6 -0
- package/src/helpers/location.helper.spec.ts +195 -0
- package/src/helpers/location.helper.ts +53 -0
- package/src/helpers/problem.helper.spec.ts +21 -0
- package/src/helpers/problem.helper.ts +4 -0
- package/src/helpers/string.helper.spec.ts +186 -0
- package/src/helpers/string.helper.ts +83 -0
- package/src/helpers/table.helper.spec.ts +141 -0
- package/src/helpers/table.helper.ts +88 -0
- package/src/index.ts +203 -0
- package/src/main.ts +25 -0
- package/src/models/breadcrumb.model.ts +6 -0
- package/src/models/caption.model.ts +7 -0
- package/src/models/chip.model.ts +8 -0
- package/src/models/cocarde.model.ts +4 -0
- package/src/models/form.model.ts +30 -0
- package/src/models/index.ts +14 -0
- package/src/models/menu.model.ts +20 -0
- package/src/models/modal.model.ts +9 -0
- package/src/models/problem.model.ts +10 -0
- package/src/models/sort.model.ts +13 -0
- package/src/models/status-type.model.ts +7 -0
- package/src/models/tab.model.ts +7 -0
- package/src/models/table.model.ts +58 -0
- package/src/models/tenant.model.ts +7 -0
- package/src/models/tooltip.model.ts +6 -0
- package/src/pages/Form.stories.js +83 -0
- package/src/pages/List.stories.js +88 -0
- package/src/plugins/confirm/index.ts +109 -0
- package/src/plugins/feature-flipper/FeatureFlipper.vue +23 -0
- package/src/plugins/feature-flipper/FeatureFlipperIndicator.vue +27 -0
- package/src/plugins/feature-flipper/FeatureFlipperModal.vue +68 -0
- package/src/plugins/feature-flipper/featureFlipper.composable.spec.ts +107 -0
- package/src/plugins/feature-flipper/featureFlipper.composable.ts +68 -0
- package/src/plugins/feature-flipper/featureFlipper.model.ts +1 -0
- package/src/plugins/feature-flipper/index.ts +15 -0
- package/src/plugins/field/FieldComponent.spec.ts +34 -0
- package/src/plugins/field/FieldComponent.stories.js +78 -0
- package/src/plugins/field/FieldComponent.vue +208 -0
- package/src/plugins/field/FieldDatalist.stories.js +35 -0
- package/src/plugins/field/FieldDatalist.vue +68 -0
- package/src/plugins/field/index.ts +31 -0
- package/src/plugins/keycloak-auth-adapter/index.ts +102 -0
- package/src/plugins/notifications/NotificationItem.stories.js +60 -0
- package/src/plugins/notifications/NotificationItem.vue +116 -0
- package/src/plugins/notifications/NotificationWidget.vue +129 -0
- package/src/plugins/notifications/index.ts +83 -0
- package/src/plugins/notifications/notification.model.ts +24 -0
- package/src/plugins/notifications/notifications.spec.js +78 -0
- package/src/plugins/router-history/index.ts +23 -0
- package/src/plugins/router-history/router-history.composable.spec.ts +323 -0
- package/src/plugins/router-history/router-history.composable.ts +47 -0
- package/src/plugins/runtime-env/index.ts +19 -0
- package/src/services/index.ts +1 -0
- package/src/services/konami.service.ts +28 -0
- package/src/showroom/App.vue +109 -0
- package/src/showroom/db.json +1967 -0
- package/src/showroom/pages/autocomplete.vue +54 -0
- package/src/showroom/pages/draggable-list.vue +20 -0
- package/src/showroom/pages/file-picker.vue +74 -0
- package/src/showroom/pages/forms.vue +389 -0
- package/src/showroom/pages/index.vue +209 -0
- package/src/showroom/pages/paginated-cards.vue +48 -0
- package/src/showroom/pages/server-table.vue +160 -0
- package/src/showroom/pages/stepper.vue +37 -0
- package/src/showroom/pages/table.vue +192 -0
- package/src/showroom/pages/tabs/[tabName].vue +28 -0
- package/src/showroom/router.ts +15 -0
- package/src/showroom/server.js +45 -0
- package/src/vite-env.d.ts +9 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { StatusType } from '@/models';
|
|
3
|
+
import { computed } from 'vue';
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
pending: number;
|
|
8
|
+
color?: StatusType;
|
|
9
|
+
}>(),
|
|
10
|
+
{ pending: 0, color: StatusType.Information },
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
const classes = computed(() => {
|
|
14
|
+
return `is-${props.color}`;
|
|
15
|
+
});
|
|
16
|
+
const sanitizedPending = computed(() => {
|
|
17
|
+
return props.pending > 99 ? '99+' : props.pending;
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<span class="ui-badge__container" v-if="pending > 0">
|
|
23
|
+
<slot></slot>
|
|
24
|
+
<span v-if="pending > 0" :class="classes" class="ui-badge__badge">
|
|
25
|
+
{{ sanitizedPending }}
|
|
26
|
+
</span>
|
|
27
|
+
</span>
|
|
28
|
+
<template v-else>
|
|
29
|
+
<slot></slot>
|
|
30
|
+
</template>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<style scoped lang="scss">
|
|
34
|
+
.ui-badge__container {
|
|
35
|
+
display: flex;
|
|
36
|
+
|
|
37
|
+
&.not-pending {
|
|
38
|
+
display: initial;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ui-badge__badge {
|
|
42
|
+
margin-top: -3px;
|
|
43
|
+
color: white;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
font-size: 0.5em;
|
|
46
|
+
height: 1.9em;
|
|
47
|
+
width: 1.9em;
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
white-space: nowrap;
|
|
53
|
+
text-overflow: ellipsis;
|
|
54
|
+
|
|
55
|
+
&.is-default {
|
|
56
|
+
background-color: var(--bms-grey-100);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.is-information {
|
|
60
|
+
background-color: var(--bms-main-100);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.is-warning {
|
|
64
|
+
background-color: var(--bms-orange-100);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.is-danger {
|
|
68
|
+
background-color: var(--bms-red-100);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.is-success {
|
|
72
|
+
background-color: var(--bms-green-100);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import BmsCaption from './BmsCaption.vue';
|
|
2
|
+
import { StatusType } from '@/models/status-type.model';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'shared/BmsCaption',
|
|
6
|
+
component: BmsCaption,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => ({
|
|
10
|
+
components: {
|
|
11
|
+
BmsCaption,
|
|
12
|
+
},
|
|
13
|
+
setup() {
|
|
14
|
+
return { args };
|
|
15
|
+
},
|
|
16
|
+
template: `
|
|
17
|
+
<section>
|
|
18
|
+
<template v-for="caption in args.captions">
|
|
19
|
+
<BmsCaption v-bind="caption"/>
|
|
20
|
+
</template>
|
|
21
|
+
</section>
|
|
22
|
+
`,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const All = Template.bind({});
|
|
26
|
+
All.args = {
|
|
27
|
+
captions: [
|
|
28
|
+
{ caption: 'Retro Compat : this my caption' },
|
|
29
|
+
{
|
|
30
|
+
caption: {
|
|
31
|
+
label: 'Default : this my caption',
|
|
32
|
+
mode: StatusType.Default,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
caption: {
|
|
37
|
+
label: 'Success : this my caption',
|
|
38
|
+
mode: StatusType.Success,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
caption: {
|
|
43
|
+
label: 'Warning : this my caption',
|
|
44
|
+
mode: StatusType.Warning,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
caption: { label: 'Danger : this my caption', mode: StatusType.Danger },
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
caption: {
|
|
52
|
+
label:
|
|
53
|
+
'Danger : this my caption with <script lang="js"> alert("super!");</script><a onclick=alert("toto") class=danger href=www.google.fr target=_blank>HTML</a>',
|
|
54
|
+
labelAsHtml: true,
|
|
55
|
+
mode: StatusType.Danger,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="caption" :class="`caption-${computedCaption.mode}`">
|
|
3
|
+
<span class="icon" v-if="computedCaption.mode != StatusType.Default"
|
|
4
|
+
><alertIcon :size="13"
|
|
5
|
+
/></span>
|
|
6
|
+
<span class="label" v-html="sanitizeHtml(computedCaption.label)" />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { AlertOctagon, AlertTriangle, CheckCircle } from 'lucide-vue-next';
|
|
12
|
+
import { type Component, computed, ComputedRef } from 'vue';
|
|
13
|
+
import { type Caption, StatusType } from '@/models';
|
|
14
|
+
import { convertStringToCaption } from '@/helpers';
|
|
15
|
+
import { sanitizeHtml } from '@/helpers/string.helper';
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{ caption: string | Caption }>();
|
|
18
|
+
|
|
19
|
+
const computedCaption: ComputedRef<Caption> = computed(() => {
|
|
20
|
+
let caption: Caption = convertStringToCaption(props.caption);
|
|
21
|
+
if (caption.mode === null) {
|
|
22
|
+
caption.mode = StatusType.Default;
|
|
23
|
+
}
|
|
24
|
+
return caption;
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const alertIcon: ComputedRef<Component> = computed(() => {
|
|
28
|
+
const mode = computedCaption.value.mode || StatusType.Default;
|
|
29
|
+
switch (mode) {
|
|
30
|
+
case StatusType.Danger:
|
|
31
|
+
return AlertOctagon;
|
|
32
|
+
case StatusType.Warning:
|
|
33
|
+
return AlertTriangle;
|
|
34
|
+
case StatusType.Success:
|
|
35
|
+
return CheckCircle;
|
|
36
|
+
default:
|
|
37
|
+
return CheckCircle;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss" scoped>
|
|
43
|
+
.caption {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-wrap: nowrap;
|
|
46
|
+
align-items: baseline;
|
|
47
|
+
cursor: default;
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
color: var(--bms-grey-75);
|
|
50
|
+
|
|
51
|
+
:deep(*) {
|
|
52
|
+
color: var(--bms-grey-75);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&-success {
|
|
56
|
+
color: var(--bms-success-color);
|
|
57
|
+
|
|
58
|
+
:deep(*) {
|
|
59
|
+
color: var(--bms-success-color);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&-danger {
|
|
64
|
+
color: var(--bms-danger-color);
|
|
65
|
+
|
|
66
|
+
:deep(*) {
|
|
67
|
+
color: var(--bms-danger-color);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&-warning {
|
|
72
|
+
color: var(--bms-warning-color);
|
|
73
|
+
|
|
74
|
+
:deep(*) {
|
|
75
|
+
color: var(--bms-warning-color);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.icon {
|
|
80
|
+
margin-right: 5px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.label {
|
|
84
|
+
flex-grow: 1;
|
|
85
|
+
align-self: center;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import BmsCircularProgress from '@/components/feedback/BmsCircularProgress.vue';
|
|
2
|
+
import { mount } from '@vue/test-utils';
|
|
3
|
+
|
|
4
|
+
describe('BmsCircularProgress', () => {
|
|
5
|
+
it('should mount component correctly', async () => {
|
|
6
|
+
const wrapper = mount(BmsCircularProgress, {
|
|
7
|
+
props: {
|
|
8
|
+
progress: 42,
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
expect(wrapper.text()).toContain('42%');
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import BmsCircularProgress from '@/components/feedback/BmsCircularProgress.vue';
|
|
2
|
+
|
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Composants/feedback/CircularProgress',
|
|
6
|
+
component: BmsCircularProgress,
|
|
7
|
+
// More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
|
|
8
|
+
argTypes: {
|
|
9
|
+
progress: {
|
|
10
|
+
control: { type: 'number' },
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
|
16
|
+
const Template = (args) => ({
|
|
17
|
+
// Components used in your story `template` are defined in the `components` object
|
|
18
|
+
components: {
|
|
19
|
+
BmsCircularProgress,
|
|
20
|
+
},
|
|
21
|
+
// The story's `args` need to be mapped into the template through the `setup()` method
|
|
22
|
+
setup() {
|
|
23
|
+
return { args };
|
|
24
|
+
},
|
|
25
|
+
// And then the `args` are bound to your component with `v-bind="args"`
|
|
26
|
+
template: `
|
|
27
|
+
<BmsCircularProgress v-bind="args" />
|
|
28
|
+
`,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const NoProgress = Template.bind({});
|
|
32
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
33
|
+
NoProgress.args = {
|
|
34
|
+
progress: 0,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const InProgress = Template.bind({});
|
|
38
|
+
InProgress.args = {
|
|
39
|
+
progress: 30,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const ProgressCompleted = Template.bind({});
|
|
43
|
+
ProgressCompleted.args = {
|
|
44
|
+
progress: 100,
|
|
45
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
defineProps(['progress']);
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="circular-progress">
|
|
7
|
+
<svg v-if="progress" viewBox="0 0 100 100">
|
|
8
|
+
<g transform="rotate(-90, 50, 50)">
|
|
9
|
+
<circle
|
|
10
|
+
opacity=".08"
|
|
11
|
+
r="45"
|
|
12
|
+
cx="50"
|
|
13
|
+
cy="50"
|
|
14
|
+
fill="transparent"
|
|
15
|
+
stroke="black"
|
|
16
|
+
stroke-linecap="round"
|
|
17
|
+
></circle>
|
|
18
|
+
<circle
|
|
19
|
+
r="45"
|
|
20
|
+
cx="50"
|
|
21
|
+
cy="50"
|
|
22
|
+
fill="transparent"
|
|
23
|
+
stroke="currentColor"
|
|
24
|
+
stroke-linecap="round"
|
|
25
|
+
:stroke-dashoffset="283 - (progress * 283) / 100"
|
|
26
|
+
stroke-dasharray="283"
|
|
27
|
+
></circle>
|
|
28
|
+
</g>
|
|
29
|
+
</svg>
|
|
30
|
+
|
|
31
|
+
<div class="percent">{{ progress }}%</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<style lang="scss" scoped>
|
|
36
|
+
.circular-progress {
|
|
37
|
+
--size: 4em;
|
|
38
|
+
--stroke-width: 8;
|
|
39
|
+
|
|
40
|
+
display: inline-block;
|
|
41
|
+
width: var(--size);
|
|
42
|
+
height: var(--size);
|
|
43
|
+
position: relative;
|
|
44
|
+
.percent {
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: 50%;
|
|
47
|
+
left: 50%;
|
|
48
|
+
transform: translate3d(-50%, -50%, 0);
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
line-height: 1;
|
|
51
|
+
color: var(--text-color);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
svg {
|
|
55
|
+
width: var(--size);
|
|
56
|
+
height: var(--size);
|
|
57
|
+
stroke-width: var(--stroke-width);
|
|
58
|
+
|
|
59
|
+
circle {
|
|
60
|
+
transition: stroke-dashoffset 0.2s ease-in-out;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</style>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import BmsLoader from '@/components/feedback/BmsLoader.vue';
|
|
2
|
+
|
|
3
|
+
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Composants/feedback/Loader',
|
|
6
|
+
component: BmsLoader,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
// More on component templates: https://storybook.js.org/docs/vue/writing-stories/introduction#using-args
|
|
10
|
+
const Template = (args) => ({
|
|
11
|
+
// Components used in your story `template` are defined in the `components` object
|
|
12
|
+
components: {
|
|
13
|
+
BmsLoader,
|
|
14
|
+
},
|
|
15
|
+
// The story's `args` need to be mapped into the template through the `setup()` method
|
|
16
|
+
setup() {
|
|
17
|
+
return { args };
|
|
18
|
+
},
|
|
19
|
+
// And then the `args` are bound to your component with `v-bind="args"`
|
|
20
|
+
template: `
|
|
21
|
+
<BmsLoader v-bind="args">
|
|
22
|
+
This is content
|
|
23
|
+
</BmsLoader>
|
|
24
|
+
`,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const Primary = Template.bind({});
|
|
28
|
+
// More on args: https://storybook.js.org/docs/vue/writing-stories/args
|
|
29
|
+
Primary.args = {
|
|
30
|
+
size: 64,
|
|
31
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// Export for unit tests
|
|
3
|
+
export function transformIntoPx(totransform: string | number) {
|
|
4
|
+
return typeof totransform === 'string' ? totransform : `${totransform}px`;
|
|
5
|
+
}
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { computed } from 'vue';
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(
|
|
12
|
+
defineProps<{
|
|
13
|
+
size?: string | number;
|
|
14
|
+
}>(),
|
|
15
|
+
{ size: 'inherit' },
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const sizeInPx = computed<string>(() => {
|
|
19
|
+
return transformIntoPx(props.size);
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<div class="bms-loader">
|
|
25
|
+
<svg viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg">
|
|
26
|
+
<defs>
|
|
27
|
+
<linearGradient x1="8.042%" y1="0%" x2="65.682%" y2="23.865%" id="a">
|
|
28
|
+
<stop stop-color="currentColor" stop-opacity="0" offset="0%" />
|
|
29
|
+
<stop
|
|
30
|
+
stop-color="currentColor"
|
|
31
|
+
stop-opacity=".631"
|
|
32
|
+
offset="63.146%"
|
|
33
|
+
/>
|
|
34
|
+
<stop stop-color="currentColor" offset="100%" />
|
|
35
|
+
</linearGradient>
|
|
36
|
+
</defs>
|
|
37
|
+
<g fill="none" fill-rule="evenodd">
|
|
38
|
+
<g transform="translate(1 1)">
|
|
39
|
+
<path
|
|
40
|
+
d="M36 18c0-9.94-8.06-18-18-18"
|
|
41
|
+
id="Oval-2"
|
|
42
|
+
stroke="url(#a)"
|
|
43
|
+
stroke-width="2"
|
|
44
|
+
>
|
|
45
|
+
<animateTransform
|
|
46
|
+
attributeName="transform"
|
|
47
|
+
type="rotate"
|
|
48
|
+
from="0 18 18"
|
|
49
|
+
to="360 18 18"
|
|
50
|
+
dur="0.9s"
|
|
51
|
+
repeatCount="indefinite"
|
|
52
|
+
/>
|
|
53
|
+
</path>
|
|
54
|
+
<circle fill="#fff" cx="36" cy="18" r="1">
|
|
55
|
+
<animateTransform
|
|
56
|
+
attributeName="transform"
|
|
57
|
+
type="rotate"
|
|
58
|
+
from="0 18 18"
|
|
59
|
+
to="360 18 18"
|
|
60
|
+
dur="0.9s"
|
|
61
|
+
repeatCount="indefinite"
|
|
62
|
+
/>
|
|
63
|
+
</circle>
|
|
64
|
+
</g>
|
|
65
|
+
</g>
|
|
66
|
+
</svg>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<style lang="scss" scoped>
|
|
71
|
+
.bms-loader {
|
|
72
|
+
font-size: v-bind('sizeInPx');
|
|
73
|
+
color: var(--bms-main-100, currentColor);
|
|
74
|
+
display: inline-block;
|
|
75
|
+
|
|
76
|
+
svg {
|
|
77
|
+
width: 1em;
|
|
78
|
+
height: 1em;
|
|
79
|
+
display: block;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
</style>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import BmsTooltip from './BmsTooltip.vue';
|
|
2
|
+
import BmsSection from '../layout/BmsSection.vue';
|
|
3
|
+
import { TooltipDirection } from '../../models';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Composants/feedback/BmsTooltip',
|
|
7
|
+
component: BmsTooltip,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Template = (args) => ({
|
|
11
|
+
components: {
|
|
12
|
+
BmsTooltip,
|
|
13
|
+
BmsSection,
|
|
14
|
+
},
|
|
15
|
+
setup() {
|
|
16
|
+
return { args };
|
|
17
|
+
},
|
|
18
|
+
template: `
|
|
19
|
+
<BmsSection :style="'border'">
|
|
20
|
+
<div style="display: flex; gap:1em;">
|
|
21
|
+
<BmsTooltip
|
|
22
|
+
v-for="dir in ['bottom','right','left','top']" :key="dir"
|
|
23
|
+
tooltipText="this my tooltip message"
|
|
24
|
+
:direction="dir"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
style="border: 1px solid var(--bms-grey-100);padding:5px;">
|
|
28
|
+
anchor {{ dir }}
|
|
29
|
+
</div>
|
|
30
|
+
</BmsTooltip>
|
|
31
|
+
</div>
|
|
32
|
+
</BmsSection>
|
|
33
|
+
`,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export const allDirections = Template.bind({});
|
|
37
|
+
allDirections.args = {};
|
|
38
|
+
|
|
39
|
+
const TemplateSlot = (args) => ({
|
|
40
|
+
components: {
|
|
41
|
+
BmsTooltip,
|
|
42
|
+
BmsSection,
|
|
43
|
+
},
|
|
44
|
+
setup() {
|
|
45
|
+
return { args };
|
|
46
|
+
},
|
|
47
|
+
template: `
|
|
48
|
+
<BmsTooltip :tooltip-text="args.tooltipText">
|
|
49
|
+
<template #default>
|
|
50
|
+
<div
|
|
51
|
+
style="border: 1px solid var(--bms-grey-100);padding:5px;">
|
|
52
|
+
anchor
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
<template #tooltipText v-if="!args.tooltipText">
|
|
56
|
+
this is my <strong>tooltip</strong> with html <br/>
|
|
57
|
+
and a line break
|
|
58
|
+
</template>
|
|
59
|
+
</BmsTooltip>
|
|
60
|
+
`,
|
|
61
|
+
});
|
|
62
|
+
export const WithSlot = TemplateSlot.bind({});
|
|
63
|
+
WithSlot.args = {};
|
|
64
|
+
export const WithTooltipText = TemplateSlot.bind({});
|
|
65
|
+
WithTooltipText.args = { tooltipText: 'this is my tooltip' };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="body">
|
|
3
|
+
<UiTooltip
|
|
4
|
+
v-if="anchorVisibility"
|
|
5
|
+
:visible="showToolTip && activated"
|
|
6
|
+
:direction="direction"
|
|
7
|
+
:getAnchorElementValues="getAnchorElementValues"
|
|
8
|
+
>
|
|
9
|
+
<slot name="tooltipText">
|
|
10
|
+
{{ tooltipText }}
|
|
11
|
+
</slot>
|
|
12
|
+
</UiTooltip>
|
|
13
|
+
</Teleport>
|
|
14
|
+
|
|
15
|
+
<div ref="tooltipAnchor" class="bms-tooltip-anchor-wrapper" v-if="activated">
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<slot v-if="!activated"></slot>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import { TooltipDirection } from '@/models';
|
|
24
|
+
import {
|
|
25
|
+
useMouseInElement,
|
|
26
|
+
MaybeElementRef,
|
|
27
|
+
useElementVisibility,
|
|
28
|
+
} from '@vueuse/core';
|
|
29
|
+
import { ref, watchEffect } from 'vue';
|
|
30
|
+
import UiTooltip from './UiTooltip.vue';
|
|
31
|
+
|
|
32
|
+
const tooltip = ref(null);
|
|
33
|
+
const tooltipAnchor = ref<Element>();
|
|
34
|
+
const showToolTip = ref(true);
|
|
35
|
+
|
|
36
|
+
const { isOutside } = useMouseInElement(tooltipAnchor as MaybeElementRef);
|
|
37
|
+
const anchorVisibility = useElementVisibility(tooltipAnchor as MaybeElementRef);
|
|
38
|
+
|
|
39
|
+
withDefaults(
|
|
40
|
+
defineProps<{
|
|
41
|
+
tooltipText?: string;
|
|
42
|
+
direction?: TooltipDirection;
|
|
43
|
+
focus?: boolean;
|
|
44
|
+
activated?: boolean;
|
|
45
|
+
}>(),
|
|
46
|
+
{
|
|
47
|
+
tooltipText: '',
|
|
48
|
+
direction: TooltipDirection.Bottom,
|
|
49
|
+
focus: false,
|
|
50
|
+
activated: true,
|
|
51
|
+
},
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const isUnderOverlay = (): boolean => {
|
|
55
|
+
const overlays = Array.from(document.getElementsByClassName('overlay'));
|
|
56
|
+
if (overlays.length === 0) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
return !overlays.find((overlay) => overlay.contains(tooltip.value));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const getAnchorElementValues = () => {
|
|
63
|
+
if (!tooltipAnchor.value) return;
|
|
64
|
+
const { top, bottom, left, right, width, height } =
|
|
65
|
+
tooltipAnchor.value.getBoundingClientRect();
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
top: top + window.scrollY,
|
|
69
|
+
left: left + window.scrollX,
|
|
70
|
+
right,
|
|
71
|
+
bottom,
|
|
72
|
+
width,
|
|
73
|
+
height,
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
watchEffect(() => {
|
|
78
|
+
if (isOutside.value) {
|
|
79
|
+
toggleTooltip(false);
|
|
80
|
+
} else {
|
|
81
|
+
if (!isUnderOverlay()) {
|
|
82
|
+
toggleTooltip(true);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
function toggleTooltip(state: boolean) {
|
|
88
|
+
showToolTip.value = state;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
defineExpose({
|
|
92
|
+
toggle: toggleTooltip,
|
|
93
|
+
});
|
|
94
|
+
</script>
|
|
95
|
+
|
|
96
|
+
<style lang="scss" scoped>
|
|
97
|
+
.bms-tooltip-anchor-wrapper {
|
|
98
|
+
position: relative;
|
|
99
|
+
display: inline-block;
|
|
100
|
+
outline: none;
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import NotificationItem from '../../plugins/notifications/NotificationItem.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Composants/feedback/Notifications',
|
|
5
|
+
component: NotificationItem,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => ({
|
|
9
|
+
components: {
|
|
10
|
+
NotificationItem,
|
|
11
|
+
},
|
|
12
|
+
setup() {
|
|
13
|
+
return { args };
|
|
14
|
+
},
|
|
15
|
+
template: `
|
|
16
|
+
<NotificationItem v-bind="args">
|
|
17
|
+
</NotificationItem>
|
|
18
|
+
`,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const Sucess = Template.bind({});
|
|
22
|
+
Sucess.args = {
|
|
23
|
+
notification: {
|
|
24
|
+
id: 1,
|
|
25
|
+
type: 'success',
|
|
26
|
+
text: 'Sucess',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Error = Template.bind({});
|
|
31
|
+
Error.args = {
|
|
32
|
+
notification: {
|
|
33
|
+
id: 1,
|
|
34
|
+
type: 'error',
|
|
35
|
+
text: 'Error',
|
|
36
|
+
},
|
|
37
|
+
};
|