@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,217 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav>
|
|
3
|
+
<ul>
|
|
4
|
+
<li v-for="item in currentItems" :key="item.label">
|
|
5
|
+
<div class="parent-container" v-if="hasSubItems(item)">
|
|
6
|
+
<template v-if="item.link">
|
|
7
|
+
<BmsLink
|
|
8
|
+
:to="item.link"
|
|
9
|
+
:class="`parent-item ${isItemActive(item as ParentMenuItem) ? 'active' : ''}`"
|
|
10
|
+
>
|
|
11
|
+
<span class="parent-label">{{ item.label }}</span>
|
|
12
|
+
<component
|
|
13
|
+
v-if="item.icon"
|
|
14
|
+
:is="item.icon"
|
|
15
|
+
class="parent-item__custom-icon"
|
|
16
|
+
/>
|
|
17
|
+
</BmsLink>
|
|
18
|
+
</template>
|
|
19
|
+
<template v-else>
|
|
20
|
+
<div
|
|
21
|
+
class="parent-item"
|
|
22
|
+
@click="toggleParentItem(item as ParentMenuItem)"
|
|
23
|
+
>
|
|
24
|
+
<span class="parent-label">{{ item.label }}</span>
|
|
25
|
+
<ChevronDown v-if="!(item as ParentMenuItem).open" />
|
|
26
|
+
<ChevronUp v-else />
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
<Transition name="open">
|
|
30
|
+
<ul v-show="(item as ParentMenuItem).open">
|
|
31
|
+
<li
|
|
32
|
+
v-for="subItem in (item as ParentMenuItem).items"
|
|
33
|
+
:key="subItem.label"
|
|
34
|
+
>
|
|
35
|
+
<UiMenuItem
|
|
36
|
+
:item="subItem as MenuItem"
|
|
37
|
+
:active="isItemActive(subItem as MenuItem)"
|
|
38
|
+
@click="clickItem(subItem)"
|
|
39
|
+
/>
|
|
40
|
+
</li>
|
|
41
|
+
</ul>
|
|
42
|
+
</Transition>
|
|
43
|
+
</div>
|
|
44
|
+
<UiMenuItem
|
|
45
|
+
v-else
|
|
46
|
+
:item="item as MenuItem"
|
|
47
|
+
:active="isItemActive(item as MenuItem)"
|
|
48
|
+
@click="clickItem(item)"
|
|
49
|
+
/>
|
|
50
|
+
</li>
|
|
51
|
+
</ul>
|
|
52
|
+
<div class="additional">
|
|
53
|
+
<slot name="additional" :closeMenu="closeMenu"></slot>
|
|
54
|
+
</div>
|
|
55
|
+
</nav>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script lang="ts" setup>
|
|
59
|
+
import { MenuItem, ParentMenuItem } from '@/models/menu.model';
|
|
60
|
+
import { Ref, ref, watchEffect } from 'vue';
|
|
61
|
+
import {
|
|
62
|
+
RouteLocationNamedRaw,
|
|
63
|
+
RouteLocationNormalizedLoaded,
|
|
64
|
+
RouteLocationPathRaw,
|
|
65
|
+
RouteLocationRaw,
|
|
66
|
+
} from 'vue-router';
|
|
67
|
+
import { ChevronDown, ChevronUp, Settings } from 'lucide-vue-next';
|
|
68
|
+
import UiMenuItem from './UiMenuItem.vue';
|
|
69
|
+
import BmsLink from './BmsLink.vue';
|
|
70
|
+
|
|
71
|
+
interface Props {
|
|
72
|
+
items: (MenuItem | ParentMenuItem)[];
|
|
73
|
+
activeLink: RouteLocationNormalizedLoaded;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const props = withDefaults(defineProps<Props>(), {});
|
|
77
|
+
const emits = defineEmits<{
|
|
78
|
+
(e: 'closeMenu', payload: boolean): void;
|
|
79
|
+
(e: 'clickItem', payload: ParentMenuItem | MenuItem | null): void;
|
|
80
|
+
}>();
|
|
81
|
+
|
|
82
|
+
const hasSubItems = (item: MenuItem | ParentMenuItem) => {
|
|
83
|
+
return item.hasOwnProperty('items');
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const currentItems: Ref<(MenuItem | ParentMenuItem)[]> = ref([]);
|
|
87
|
+
|
|
88
|
+
const isLinkRecognized = (link: RouteLocationRaw): boolean => {
|
|
89
|
+
if ((link as RouteLocationNamedRaw).name) {
|
|
90
|
+
return (link as RouteLocationNamedRaw).name === props.activeLink.name;
|
|
91
|
+
}
|
|
92
|
+
if ((link as RouteLocationPathRaw).path) {
|
|
93
|
+
return (link as RouteLocationPathRaw).path === props.activeLink.path;
|
|
94
|
+
}
|
|
95
|
+
return link === props.activeLink.name || link === props.activeLink.path;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const isItemActive = (menuItem: MenuItem | ParentMenuItem): boolean => {
|
|
99
|
+
if (props.activeLink?.meta?.menuItemId) {
|
|
100
|
+
return props.activeLink.meta.menuItemId === menuItem.id;
|
|
101
|
+
} else if (menuItem?.link) {
|
|
102
|
+
return isLinkRecognized(menuItem.link);
|
|
103
|
+
} else {
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
watchEffect(() => {
|
|
109
|
+
currentItems.value = props.items.map((item) => {
|
|
110
|
+
if (!hasSubItems(item)) {
|
|
111
|
+
return item;
|
|
112
|
+
}
|
|
113
|
+
const parentItem: ParentMenuItem = item as ParentMenuItem;
|
|
114
|
+
if (parentItem.open) {
|
|
115
|
+
return parentItem;
|
|
116
|
+
}
|
|
117
|
+
parentItem.open =
|
|
118
|
+
parentItem.open === undefined ||
|
|
119
|
+
!!parentItem.items.find(isItemActive) ||
|
|
120
|
+
!!parentItem.link;
|
|
121
|
+
return parentItem;
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const closeMenu = () => {
|
|
126
|
+
emits('closeMenu', false);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const clickItem = (payload: ParentMenuItem | MenuItem) => {
|
|
130
|
+
emits('closeMenu', false);
|
|
131
|
+
emits('clickItem', payload);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const toggleParentItem = (item: ParentMenuItem) => {
|
|
135
|
+
item.open = !item.open;
|
|
136
|
+
};
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<style lang="scss" scoped>
|
|
140
|
+
nav {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
flex: 1 1 auto;
|
|
144
|
+
overflow: auto;
|
|
145
|
+
padding: 6rem 0 2rem;
|
|
146
|
+
background-color: var(--bms-white);
|
|
147
|
+
|
|
148
|
+
ul {
|
|
149
|
+
margin: 0;
|
|
150
|
+
padding: 0;
|
|
151
|
+
|
|
152
|
+
li {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
list-style-type: none;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
width: 100%;
|
|
158
|
+
|
|
159
|
+
.parent-container {
|
|
160
|
+
width: 100%;
|
|
161
|
+
|
|
162
|
+
.parent-item {
|
|
163
|
+
display: flex;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
align-items: center;
|
|
166
|
+
color: var(--bms-grey-75);
|
|
167
|
+
padding: 14px 8px;
|
|
168
|
+
|
|
169
|
+
:deep(.internal-link) {
|
|
170
|
+
color: inherit;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&__custom-icon {
|
|
174
|
+
width: 1em;
|
|
175
|
+
height: 1em;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&:hover {
|
|
179
|
+
color: var(--bms-main-100);
|
|
180
|
+
text-decoration: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.parent-label {
|
|
184
|
+
line-height: 16px;
|
|
185
|
+
font-size: 14px;
|
|
186
|
+
text-transform: uppercase;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
.additional {
|
|
193
|
+
display: flex;
|
|
194
|
+
flex-direction: column;
|
|
195
|
+
flex-grow: 1;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.open-enter-active {
|
|
200
|
+
transition: all 0.7s ease;
|
|
201
|
+
}
|
|
202
|
+
.open-leave-active {
|
|
203
|
+
transition: all 0.25s linear;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.open-enter-from,
|
|
207
|
+
.open-leave-to {
|
|
208
|
+
max-height: 0;
|
|
209
|
+
opacity: 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.open-enter-to,
|
|
213
|
+
.open-leave-from {
|
|
214
|
+
max-height: 500px;
|
|
215
|
+
opacity: 1;
|
|
216
|
+
}
|
|
217
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import BmsShortLinkMenu from '@/components/navigation/BmsShortLinkMenu.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Composants/navigation/BmsShortLinkMenu',
|
|
5
|
+
component: BmsShortLinkMenu,
|
|
6
|
+
argTypes: {},
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => ({
|
|
10
|
+
components: {
|
|
11
|
+
BmsShortLinkMenu,
|
|
12
|
+
},
|
|
13
|
+
setup() {
|
|
14
|
+
return { args };
|
|
15
|
+
},
|
|
16
|
+
template: `
|
|
17
|
+
<h3>Default</h3>
|
|
18
|
+
<BmsShortLinkMenu v-bind="args.default"/>
|
|
19
|
+
<br/><br/>
|
|
20
|
+
<h3>Outlined</h3>
|
|
21
|
+
<BmsShortLinkMenu v-bind="args.outline"/>
|
|
22
|
+
<br/><br/>
|
|
23
|
+
<h3>Show Help</h3>
|
|
24
|
+
<BmsShortLinkMenu v-bind="args.showHelp"/>
|
|
25
|
+
<h4>Show Help Outlined</h4>
|
|
26
|
+
<br/>
|
|
27
|
+
<BmsShortLinkMenu v-bind="args.showHelpOutlined"/>
|
|
28
|
+
<br/><br/>
|
|
29
|
+
<h3>Show Activity</h3>
|
|
30
|
+
<BmsShortLinkMenu v-bind="args.showActivity"/>
|
|
31
|
+
<br/>
|
|
32
|
+
<h4>Show Activity Outlined</h4>
|
|
33
|
+
<BmsShortLinkMenu v-bind="args.showActivityOutlined"/>
|
|
34
|
+
<br/><br/>
|
|
35
|
+
<h3>Without link</h3>
|
|
36
|
+
<BmsShortLinkMenu v-bind="{}"/>
|
|
37
|
+
`,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const AllMenu = Template.bind({});
|
|
41
|
+
AllMenu.args = {
|
|
42
|
+
default: { helpLink: '/path', activityLink: '/path' },
|
|
43
|
+
|
|
44
|
+
outline: { helpLink: '/path', activityLink: '/path', outline: true },
|
|
45
|
+
|
|
46
|
+
showHelp: { helpLink: '/path', activityLink: null },
|
|
47
|
+
showHelpOutlined: { helpLink: '/path', activityLink: null, outline: true },
|
|
48
|
+
|
|
49
|
+
showActivity: { helpLink: null, activityLink: '/path' },
|
|
50
|
+
showActivityOutlined: {
|
|
51
|
+
helpLink: null,
|
|
52
|
+
activityLink: '/path',
|
|
53
|
+
outline: true,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
v-if="!!helpLink || !!activityLink"
|
|
4
|
+
class="bms-short-link-menu"
|
|
5
|
+
:class="{ 'bms-short-link-menu__outline': outline }"
|
|
6
|
+
>
|
|
7
|
+
<BmsIconButton
|
|
8
|
+
v-if="!!helpLink"
|
|
9
|
+
tooltip-text="Voir la documentation"
|
|
10
|
+
:to="helpLink"
|
|
11
|
+
target="_blank"
|
|
12
|
+
>
|
|
13
|
+
<slot name="documentationIcon">
|
|
14
|
+
<AnimatedCircleHelpIcon />
|
|
15
|
+
</slot>
|
|
16
|
+
</BmsIconButton>
|
|
17
|
+
<BmsIconButton
|
|
18
|
+
v-if="!!activityLink"
|
|
19
|
+
tooltip-text="Voir l'activité"
|
|
20
|
+
:to="activityLink"
|
|
21
|
+
target="_self"
|
|
22
|
+
>
|
|
23
|
+
<slot name="activityIcon">
|
|
24
|
+
<AnimatedActivityIcon />
|
|
25
|
+
</slot>
|
|
26
|
+
</BmsIconButton>
|
|
27
|
+
</span>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
32
|
+
import BmsIconButton from '@/components/button/BmsIconButton.vue';
|
|
33
|
+
import AnimatedCircleHelpIcon from '@/assets/animated-icons/AnimatedCircleHelpIcon.vue';
|
|
34
|
+
import AnimatedActivityIcon from '@/assets/animated-icons/AnimatedActivityIcon.vue';
|
|
35
|
+
|
|
36
|
+
withDefaults(
|
|
37
|
+
defineProps<{
|
|
38
|
+
outline: boolean;
|
|
39
|
+
helpLink: string | RouteLocationRaw | null;
|
|
40
|
+
activityLink: string | RouteLocationRaw | null;
|
|
41
|
+
}>(),
|
|
42
|
+
{ outline: false, helpLink: null, activityLink: null },
|
|
43
|
+
);
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style scoped lang="scss">
|
|
47
|
+
.bms-short-link-menu {
|
|
48
|
+
display: flex;
|
|
49
|
+
height: fit-content;
|
|
50
|
+
width: fit-content;
|
|
51
|
+
margin-left: 0.5em;
|
|
52
|
+
align-self: center;
|
|
53
|
+
border-radius: var(--bms-border-radius);
|
|
54
|
+
|
|
55
|
+
&__outline {
|
|
56
|
+
border: 1px solid var(--bms-grey-25);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import BmsTabs from '@/components/navigation/BmsTabs.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Composants/navigation/Tabs',
|
|
5
|
+
component: BmsTabs,
|
|
6
|
+
argTypes: {
|
|
7
|
+
items: {},
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const Template = (args) => ({
|
|
12
|
+
components: {
|
|
13
|
+
BmsTabs,
|
|
14
|
+
},
|
|
15
|
+
setup() {
|
|
16
|
+
return { args };
|
|
17
|
+
},
|
|
18
|
+
template: `
|
|
19
|
+
<BmsTabs v-bind="args" />
|
|
20
|
+
`,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const Primary = Template.bind({});
|
|
24
|
+
Primary.args = {
|
|
25
|
+
title: 'Title',
|
|
26
|
+
tabs: [
|
|
27
|
+
{ name: 'Titi', routePath: 'titi' },
|
|
28
|
+
{ name: 'Toto', routePath: 'toto' },
|
|
29
|
+
],
|
|
30
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tabs-header">
|
|
3
|
+
<div class="tabs-title">
|
|
4
|
+
<h3>{{ title }}</h3>
|
|
5
|
+
</div>
|
|
6
|
+
<UiTab
|
|
7
|
+
v-for="tab in tabs"
|
|
8
|
+
:key="tab.name"
|
|
9
|
+
:tab="tab"
|
|
10
|
+
:current-route="currentRoute"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import { useRouter } from 'vue-router';
|
|
17
|
+
import { Tab } from '@/models/tab.model';
|
|
18
|
+
import UiTab from './UiTab.vue';
|
|
19
|
+
|
|
20
|
+
const { currentRoute } = useRouter();
|
|
21
|
+
|
|
22
|
+
defineProps<{ title: string; tabs: Tab[] }>();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style lang="scss" scoped>
|
|
26
|
+
.tabs-header {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
border-bottom: 1px solid var(--bms-grey-25);
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
|
|
32
|
+
.tabs-title {
|
|
33
|
+
margin-right: auto;
|
|
34
|
+
margin-bottom: 16px;
|
|
35
|
+
|
|
36
|
+
h3 {
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
a {
|
|
42
|
+
position: relative;
|
|
43
|
+
top: 1px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import BmsTenantSwitcher from '@/components/navigation/BmsTenantSwitcher.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Composants/navigation/TenantSwitcher',
|
|
5
|
+
component: BmsTenantSwitcher,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const logoFile =
|
|
9
|
+
'https://cdn.sipaof.fr/sipaui/latest/downloads/cocardes/of.svg';
|
|
10
|
+
|
|
11
|
+
const Template = () => ({
|
|
12
|
+
components: {
|
|
13
|
+
BmsTenantSwitcher,
|
|
14
|
+
},
|
|
15
|
+
setup() {
|
|
16
|
+
const noTenantArgs = {
|
|
17
|
+
currentTenant: null,
|
|
18
|
+
tenants: [],
|
|
19
|
+
selectTenantLabel: 'Label',
|
|
20
|
+
selectTenantPlaceholder: 'Placeholder',
|
|
21
|
+
};
|
|
22
|
+
const singleTenantArgs = {
|
|
23
|
+
currentTenant: { id: 'id', label: 'Tenant label', logoFile },
|
|
24
|
+
tenants: [{ id: 'id', label: 'Tenant label' }],
|
|
25
|
+
selectTenantLabel: 'Label',
|
|
26
|
+
selectTenantPlaceholder: 'Placeholder',
|
|
27
|
+
};
|
|
28
|
+
const noCurrentTenantArgs = {
|
|
29
|
+
currentTenant: null,
|
|
30
|
+
tenants: [{ id: 'id1', label: 'Tenant1 label1', initials: 'TL' }],
|
|
31
|
+
selectTenantLabel: 'Label',
|
|
32
|
+
selectTenantPlaceholder: 'Placeholder',
|
|
33
|
+
};
|
|
34
|
+
const multipleTenantsArgs = {
|
|
35
|
+
currentTenant: { id: 'id', label: 'Tenant label', logoFile },
|
|
36
|
+
tenants: [
|
|
37
|
+
{
|
|
38
|
+
id: 'id',
|
|
39
|
+
label: 'Tenant label with a super long name that overflows',
|
|
40
|
+
logoFile,
|
|
41
|
+
},
|
|
42
|
+
{ id: 'id1', label: 'Tenant1 label1', initials: 'TL' },
|
|
43
|
+
],
|
|
44
|
+
selectTenantLabel: 'Label',
|
|
45
|
+
selectTenantPlaceholder: 'Placeholder',
|
|
46
|
+
};
|
|
47
|
+
const withFavoriteTenantsArgs = {
|
|
48
|
+
currentTenant: {
|
|
49
|
+
id: 'id',
|
|
50
|
+
label: 'Tenant label',
|
|
51
|
+
},
|
|
52
|
+
tenants: [
|
|
53
|
+
{
|
|
54
|
+
id: 'id',
|
|
55
|
+
label: 'Tenant label',
|
|
56
|
+
isFavorite: true,
|
|
57
|
+
},
|
|
58
|
+
{ id: 'id1', label: 'Tenant1 label1', logoFile },
|
|
59
|
+
{ id: 'id2', label: 'Tenant2 label2' },
|
|
60
|
+
],
|
|
61
|
+
selectTenantLabel: 'Label',
|
|
62
|
+
selectTenantPlaceholder: 'Placeholder',
|
|
63
|
+
};
|
|
64
|
+
return {
|
|
65
|
+
noTenantArgs,
|
|
66
|
+
singleTenantArgs,
|
|
67
|
+
noCurrentTenantArgs,
|
|
68
|
+
multipleTenantsArgs,
|
|
69
|
+
withFavoriteTenantsArgs,
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
template: `
|
|
73
|
+
<div style="display:flex;flex-direction:column;gap:2em">
|
|
74
|
+
<strong>No tenant :</strong>
|
|
75
|
+
<BmsTenantSwitcher v-bind="noTenantArgs" />
|
|
76
|
+
<strong>Single tenant available :</strong>
|
|
77
|
+
<BmsTenantSwitcher v-bind="singleTenantArgs" />
|
|
78
|
+
<strong>No current tenant :</strong>
|
|
79
|
+
<BmsTenantSwitcher v-bind="noCurrentTenantArgs" />
|
|
80
|
+
<strong>Multiple tenants available :</strong>
|
|
81
|
+
<BmsTenantSwitcher v-bind="multipleTenantsArgs" />
|
|
82
|
+
<strong>Favorites tenants available :</strong>
|
|
83
|
+
<BmsTenantSwitcher v-bind="withFavoriteTenantsArgs" />
|
|
84
|
+
</div>
|
|
85
|
+
`,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const Default = Template.bind({});
|
|
89
|
+
Default.args = {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="tenantSwitchButton" class="tenant-switcher-button">
|
|
3
|
+
<div class="tenant-label" v-if="currentTenant && tenants.length === 1">
|
|
4
|
+
<UiTenantImage :tenant="currentTenant" />
|
|
5
|
+
<span>
|
|
6
|
+
{{ currentTenant.label }}
|
|
7
|
+
</span>
|
|
8
|
+
</div>
|
|
9
|
+
<BmsButton
|
|
10
|
+
type="tertiary"
|
|
11
|
+
@click="showTenantSwitcher = !showTenantSwitcher"
|
|
12
|
+
v-else-if="tenants.length > 0"
|
|
13
|
+
>
|
|
14
|
+
<template #start>
|
|
15
|
+
<UiTenantImage v-if="currentTenant" :tenant="currentTenant" />
|
|
16
|
+
</template>
|
|
17
|
+
<template #default>{{ tenantSwitcherLabel }}</template>
|
|
18
|
+
<template #end>
|
|
19
|
+
<ChevronDown />
|
|
20
|
+
</template>
|
|
21
|
+
</BmsButton>
|
|
22
|
+
<UiTenantSwitcher
|
|
23
|
+
:visible="showTenantSwitcher"
|
|
24
|
+
:to="tenantSwitchButton"
|
|
25
|
+
:tenants="tenants"
|
|
26
|
+
:selectTenantPlaceholder="selectTenantPlaceholder"
|
|
27
|
+
@removeFavoriteTenant="onRemoveFromFavoriteTenants"
|
|
28
|
+
@changeTenant="onChangeTenant"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import { BmsButton, Tenant } from '@/index';
|
|
35
|
+
import { ChevronDown } from 'lucide-vue-next';
|
|
36
|
+
import UiTenantSwitcher from './UiTenantSwitcher.vue';
|
|
37
|
+
import {
|
|
38
|
+
ComputedRef,
|
|
39
|
+
Ref,
|
|
40
|
+
computed,
|
|
41
|
+
onBeforeUnmount,
|
|
42
|
+
onMounted,
|
|
43
|
+
ref,
|
|
44
|
+
watch,
|
|
45
|
+
} from 'vue';
|
|
46
|
+
import UiTenantImage from './UiTenantImage.vue';
|
|
47
|
+
|
|
48
|
+
const props = withDefaults(
|
|
49
|
+
defineProps<{
|
|
50
|
+
currentTenant: Tenant | null;
|
|
51
|
+
tenants: Tenant[];
|
|
52
|
+
selectTenantLabel: string;
|
|
53
|
+
selectTenantPlaceholder: string;
|
|
54
|
+
}>(),
|
|
55
|
+
{
|
|
56
|
+
currentTenant: null,
|
|
57
|
+
tenants: () => [],
|
|
58
|
+
selectTenantLabel: '',
|
|
59
|
+
selectTenantPlaceholder: '',
|
|
60
|
+
},
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const emits = defineEmits<{
|
|
64
|
+
removeFavoriteTenant: [tenant: Tenant];
|
|
65
|
+
changeTenant: [tenant: Tenant];
|
|
66
|
+
}>();
|
|
67
|
+
|
|
68
|
+
const tenantSwitchButton: Ref<HTMLElement | null> = ref(null);
|
|
69
|
+
const showTenantSwitcher: Ref<boolean> = ref<boolean>(false);
|
|
70
|
+
|
|
71
|
+
const tenantSwitcherLabel: ComputedRef<string> = computed(() => {
|
|
72
|
+
return props.currentTenant
|
|
73
|
+
? props.currentTenant.label
|
|
74
|
+
: props.selectTenantLabel;
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
onMounted(() => {
|
|
78
|
+
document.body.addEventListener('click', tenantSwitcherCloser);
|
|
79
|
+
document.body.addEventListener('keydown', tenantSwitcherCloser);
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
onBeforeUnmount(() => {
|
|
83
|
+
window.removeEventListener('click', tenantSwitcherCloser);
|
|
84
|
+
window.removeEventListener('keydown', tenantSwitcherCloser);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const tenantSwitcherCloser = (event: any) => {
|
|
88
|
+
if (showTenantSwitcher.value && event) {
|
|
89
|
+
if (
|
|
90
|
+
(!event.target.closest('.ui-menu') &&
|
|
91
|
+
!event.target.closest('.tenant-switcher-button')) ||
|
|
92
|
+
(event.type === 'keydown' && event.key === 'Escape')
|
|
93
|
+
) {
|
|
94
|
+
showTenantSwitcher.value = false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const onChangeTenant = (tenant: Tenant) => {
|
|
100
|
+
showTenantSwitcher.value = false;
|
|
101
|
+
emits('changeTenant', tenant);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const onRemoveFromFavoriteTenants = (tenant: Tenant) => {
|
|
105
|
+
emits('removeFavoriteTenant', tenant);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
watch(
|
|
109
|
+
() => props.tenants.length,
|
|
110
|
+
() => {
|
|
111
|
+
if (props.tenants.length === 1) {
|
|
112
|
+
onChangeTenant(props.tenants[0]);
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{ immediate: true },
|
|
116
|
+
);
|
|
117
|
+
</script>
|
|
118
|
+
|
|
119
|
+
<style lang="scss" scoped>
|
|
120
|
+
.tenant-label {
|
|
121
|
+
padding: 8px;
|
|
122
|
+
width: fit-content;
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
|
|
126
|
+
span {
|
|
127
|
+
margin: 0 0.5em;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.site-logo {
|
|
132
|
+
width: 1em;
|
|
133
|
+
height: 1em;
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import UiMenuItem from '@/components/navigation/UiMenuItem.vue';
|
|
2
|
+
import { Activity } from 'lucide-vue-next';
|
|
3
|
+
import { vueRouter } from 'storybook-vue3-router';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Composants/navigation/MenuItem',
|
|
7
|
+
component: UiMenuItem,
|
|
8
|
+
decorators: [
|
|
9
|
+
vueRouter([
|
|
10
|
+
{
|
|
11
|
+
name: 'route',
|
|
12
|
+
path: '/ma-route',
|
|
13
|
+
},
|
|
14
|
+
]),
|
|
15
|
+
],
|
|
16
|
+
argTypes: {},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const Template = (args) => ({
|
|
20
|
+
components: {
|
|
21
|
+
UiMenuItem,
|
|
22
|
+
},
|
|
23
|
+
setup() {
|
|
24
|
+
return { args };
|
|
25
|
+
},
|
|
26
|
+
template: `
|
|
27
|
+
<UiMenuItem v-bind="args"/>
|
|
28
|
+
`,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export const Default = Template.bind({});
|
|
32
|
+
Default.args = {
|
|
33
|
+
item: {
|
|
34
|
+
label: 'Item label',
|
|
35
|
+
link: { name: 'route' },
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const ExternalLink = Template.bind({});
|
|
40
|
+
ExternalLink.args = {
|
|
41
|
+
item: {
|
|
42
|
+
label: 'Item label',
|
|
43
|
+
link: 'http://google.fr',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const TargetLink = Template.bind({});
|
|
48
|
+
TargetLink.args = {
|
|
49
|
+
item: {
|
|
50
|
+
label: 'Item label',
|
|
51
|
+
link: 'http://google.fr',
|
|
52
|
+
},
|
|
53
|
+
target: '_blank',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const WithIcon = Template.bind({});
|
|
57
|
+
WithIcon.args = {
|
|
58
|
+
item: {
|
|
59
|
+
label: 'Item label',
|
|
60
|
+
link: { name: 'route' },
|
|
61
|
+
icon: Activity,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const Active = Template.bind({});
|
|
66
|
+
Active.args = {
|
|
67
|
+
item: {
|
|
68
|
+
label: 'Item label',
|
|
69
|
+
link: { name: 'route' },
|
|
70
|
+
icon: Activity,
|
|
71
|
+
},
|
|
72
|
+
active: true,
|
|
73
|
+
};
|