@autoafleveren/ui 1.2.13 → 1.3.3
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/dist/config/tailwind/config.cjs +1 -0
- package/dist/icons.cjs +229 -230
- package/dist/icons.css +1 -1
- package/dist/icons.js +9985 -9758
- package/dist/types/components/AppActionBar/AppActionBar.vue.d.ts +1 -4
- package/dist/types/components/AppActionBar/AppActionBarItem.vue.d.ts +21 -0
- package/dist/types/components/AppActionBar/AppActionBarSubMenu.vue.d.ts +2 -6
- package/dist/types/components/AppActionBar/Components/Error.vue.d.ts +1 -1
- package/dist/types/components/AppActionBar/Components/Loading.vue.d.ts +1 -1
- package/dist/types/components/AppActionBar/Components/MultiSelect.vue.d.ts +4 -4
- package/dist/types/components/AppAlert/AppAlert.vue.d.ts +29 -0
- package/dist/types/components/AppAvatar/AppAvatar.vue.d.ts +2 -2
- package/dist/types/components/AppAvatar/DefaultAvatar.vue.d.ts +1 -1
- package/dist/types/components/AppBackButton/AppBackButton.vue.d.ts +4 -15
- package/dist/types/components/AppBadge/AppBadge.vue.d.ts +23 -0
- package/dist/types/components/AppButton/AppButton.vue.d.ts +26 -0
- package/dist/types/components/AppButton/ButtonIconSlot.vue.d.ts +15 -0
- package/dist/types/components/AppCard/AppCard.vue.d.ts +39 -0
- package/dist/types/components/AppCard/CardAction.vue.d.ts +1 -1
- package/dist/types/components/AppCard/CardIconSlot.vue.d.ts +17 -0
- package/dist/types/components/AppColor/AppColor.vue.d.ts +3 -6
- package/dist/types/components/AppColorCard/AppColorCard.vue.d.ts +27 -0
- package/dist/types/components/AppConfirm/AppConfirm.vue.d.ts +6 -284
- package/dist/types/components/AppContextMenu/AppContextMenu.vue.d.ts +1 -4
- package/dist/types/components/AppContextMenu/ShortcutItem.vue.d.ts +2 -2
- package/dist/types/components/AppDataTable/AppDataTable.vue.d.ts +10 -5
- package/dist/types/components/AppDataTable/AppDataTableFooter.vue.d.ts +5 -35
- package/dist/types/components/AppDefinitionList/AppDefinitionItem.vue.d.ts +30 -0
- package/dist/types/components/AppDefinitionList/AppDefinitionList.vue.d.ts +5 -13
- package/dist/types/components/AppDisclosure/AppDisclosure.vue.d.ts +3 -10
- package/dist/types/components/AppDisclosure/AppDisclosureButton.vue.d.ts +16 -0
- package/dist/types/components/AppDisclosure/AppDisclosurePanel.vue.d.ts +5 -13
- package/dist/types/components/AppDrawer/AppDrawer.vue.d.ts +4 -35
- package/dist/types/components/AppDropdownButton/AppDropdownButton.vue.d.ts +25 -0
- package/dist/types/components/AppDropdownButton/AppDropdownItem.vue.d.ts +2 -23
- package/dist/types/components/AppError/AppError.vue.d.ts +6 -47
- package/dist/types/components/AppImageDropzone/AppImageDropzone.vue.d.ts +2 -6
- package/dist/types/components/AppInput/AppInput.vue.d.ts +14 -8
- package/dist/types/components/AppInput/FileInput.vue.d.ts +5 -19
- package/dist/types/components/AppInput/Input.vue.d.ts +2 -2
- package/dist/types/components/AppInput/InputIconSlot.vue.d.ts +15 -0
- package/dist/types/components/AppInput/LocationInput.vue.d.ts +2 -5
- package/dist/types/components/AppInputLabel/AppInputLabel.vue.d.ts +5 -7
- package/dist/types/components/AppLicensePlate/AppLicensePlate.vue.d.ts +5 -11
- package/dist/types/components/AppLoader/AppLoader.vue.d.ts +2 -2
- package/dist/types/components/AppMaps/AppMaps.vue.d.ts +2 -5
- package/dist/types/components/AppMenu/AppMenu.vue.d.ts +2 -2
- package/dist/types/components/AppMenu/AppMenuItem.vue.d.ts +16 -0
- package/dist/types/components/AppModal/AppModal.vue.d.ts +51 -0
- package/dist/types/components/AppNavigationMenu/AppNavigationMenu.vue.d.ts +1 -1
- package/dist/types/components/AppNavigationMenu/Mobile.vue.d.ts +1 -1
- package/dist/types/components/AppNavigationMenu/NavigationItem.vue.d.ts +1 -1
- package/dist/types/components/AppNavigationMenu/SupportItem.vue.d.ts +1 -1
- package/dist/types/components/AppPagination/AppPagination.vue.d.ts +2 -2
- package/dist/types/components/AppPagination/AppPaginationItem.vue.d.ts +3 -9
- package/dist/types/components/AppProgressBar/AppProgressBar.vue.d.ts +2 -2
- package/dist/types/components/AppProgressBar/AppProgressBarStep.vue.d.ts +5 -7
- package/dist/types/components/AppRating/AppRating.vue.d.ts +5 -23
- package/dist/types/components/AppRating/VueStarRating/Star.vue.d.ts +2 -2
- package/dist/types/components/AppRating/VueStarRating/StarRating.vue.d.ts +5 -62
- package/dist/types/components/AppSection/AppSection.vue.d.ts +8 -13
- package/dist/types/components/AppSelect/AppSelect.vue.d.ts +33 -0
- package/dist/types/components/AppStepper/AppStepper.vue.d.ts +4 -27
- package/dist/types/components/AppTable/AppTable.vue.d.ts +5 -7
- package/dist/types/components/AppTimeline/AppTimeline.vue.d.ts +5 -12
- package/dist/types/components/AppTimeline/AppTimelineItem.vue.d.ts +10 -28
- package/dist/types/components/AppTimeline/AppTimelineItemIcon.vue.d.ts +1 -1
- package/dist/types/components/AppToggle/AppToggle.vue.d.ts +4 -4
- package/dist/types/components/AppToggleCard/AppToggleCard.vue.d.ts +27 -0
- package/dist/types/composables/index.d.ts +1 -1
- package/dist/types/composables/useActionBar/index.d.ts +3 -3
- package/dist/types/icons/BuildingCircleCheck.vue.d.ts +1 -1
- package/dist/types/icons/BuildingCircleXmark.vue.d.ts +1 -1
- package/dist/types/icons/CarsIcon.vue.d.ts +1 -1
- package/dist/types/icons/ChatPersonRoundedIcon.vue.d.ts +1 -1
- package/dist/types/icons/CompanyIcon.vue.d.ts +1 -1
- package/dist/types/icons/HeroGirlIcon.vue.d.ts +1 -1
- package/dist/types/icons/HeroPersonIcon.vue.d.ts +1 -1
- package/dist/types/icons/HeroPersonRoundedIcon.vue.d.ts +1 -1
- package/dist/types/icons/HeroPersonWithBgIcon.vue.d.ts +1 -1
- package/dist/types/icons/LocationMarkerIcon.vue.d.ts +1 -1
- package/dist/types/icons/PartyPopperIcon.vue.d.ts +1 -1
- package/dist/types/icons/status/ErrorIcon.vue.d.ts +1 -1
- package/dist/types/icons/status/SuccessIcon.vue.d.ts +1 -1
- package/dist/types/icons/status/WarningIcon.vue.d.ts +1 -1
- package/dist/types/layouts/Auth/Auth.vue.d.ts +5 -13
- package/dist/types/layouts/Base/Base.vue.d.ts +4 -17
- package/dist/types/layouts/Platform/Platform.vue.d.ts +4 -20
- package/dist/types/plugins/Toast/Toast.vue.d.ts +2 -2
- package/dist/ui-library.css +2 -2
- package/dist/ui-storybook.css +2 -2
- package/dist/ui.cjs +190 -191
- package/dist/ui.css +1 -1
- package/dist/ui.js +20566 -19443
- package/package.json +43 -47
- package/src/App.vue +15 -0
- package/src/Playground.vue.example +9 -0
- package/src/config/eslint.cjs +199 -0
- package/src/config/tailwind/config.cjs +229 -0
- package/src/config/tailwind/screens.json +9 -0
- package/src/css/build.css +52 -0
- package/src/css/main.css +4 -0
- package/src/css/theme.css +208 -0
- package/src/css/tinymce.css +58 -0
- package/src/main.ts +34 -0
- package/src/modules/components/AppActionBar/AppActionBar.vue +96 -0
- package/src/modules/components/AppActionBar/AppActionBarItem.vue +123 -0
- package/src/modules/components/AppActionBar/AppActionBarSubMenu.vue +89 -0
- package/src/modules/components/AppActionBar/Components/Error.vue +11 -0
- package/src/modules/components/AppActionBar/Components/Loading.vue +9 -0
- package/src/modules/components/AppActionBar/Components/MultiSelect.vue +102 -0
- package/src/modules/components/AppActionBar/Components/__tests__/multi-select.spec.ts +74 -0
- package/src/modules/components/AppActionBar/__mocks__/index.ts +36 -0
- package/src/modules/components/AppActionBar/__tests__/app-action-bar-item.spec.ts +134 -0
- package/src/modules/components/AppActionBar/__tests__/app-action-bar-sub-menu.spec.ts +45 -0
- package/src/modules/components/AppActionBar/__tests__/app-action-bar.spec.ts +92 -0
- package/src/modules/components/AppActionBar/index.d.ts +29 -0
- package/src/modules/components/AppActionBar/index.ts +18 -0
- package/src/modules/components/AppAlert/AppAlert.vue +69 -0
- package/src/modules/components/AppAlert/__tests__/app-alert.spec.ts +67 -0
- package/src/modules/components/AppAlert/index.d.ts +3 -0
- package/src/modules/components/AppAlert/index.ts +18 -0
- package/src/modules/components/AppAvatar/AppAvatar.vue +30 -0
- package/src/modules/components/AppAvatar/DefaultAvatar.vue +187 -0
- package/src/modules/components/AppAvatar/__tests__/app-avatar.spec.ts +70 -0
- package/src/modules/components/AppAvatar/index.d.ts +9 -0
- package/src/modules/components/AppAvatar/index.ts +9 -0
- package/src/modules/components/AppBackButton/AppBackButton.vue +51 -0
- package/src/modules/components/AppBackButton/__tests__/app-back-button.spec.ts +70 -0
- package/src/modules/components/AppBadge/AppBadge.vue +65 -0
- package/src/modules/components/AppBadge/__tests__/app-badge.spec.ts +64 -0
- package/src/modules/components/AppBadge/index.d.ts +13 -0
- package/src/modules/components/AppBadge/index.ts +29 -0
- package/src/modules/components/AppButton/AppButton.vue +53 -0
- package/src/modules/components/AppButton/ButtonIconSlot.vue +26 -0
- package/src/modules/components/AppButton/__tests__/app-button.spec.ts +145 -0
- package/src/modules/components/AppButton/__tests__/button-icon-slot.spec.ts +30 -0
- package/src/modules/components/AppButton/index.d.ts +16 -0
- package/src/modules/components/AppButton/index.ts +57 -0
- package/src/modules/components/AppCard/AppCard.vue +88 -0
- package/src/modules/components/AppCard/CardAction.vue +101 -0
- package/src/modules/components/AppCard/CardIconSlot.vue +65 -0
- package/src/modules/components/AppCard/__tests__/app-card.spec.ts +109 -0
- package/src/modules/components/AppCard/__tests__/card-action.spec.ts +55 -0
- package/src/modules/components/AppCard/__tests__/card-icon-slot.spec.ts +27 -0
- package/src/modules/components/AppCard/index.d.ts +12 -0
- package/src/modules/components/AppCard/index.ts +5 -0
- package/src/modules/components/AppColor/AppColor.vue +74 -0
- package/src/modules/components/AppColor/__tests__/app-color.spec.ts +53 -0
- package/src/modules/components/AppColor/index.d.ts +10 -0
- package/src/modules/components/AppColorCard/AppColorCard.vue +41 -0
- package/src/modules/components/AppColorCard/__tests__/app-color-card.spec.ts +55 -0
- package/src/modules/components/AppConfirm/AppConfirm.vue +237 -0
- package/src/modules/components/AppConfirm/__tests__/app-confirm.spec.ts +366 -0
- package/src/modules/components/AppConfirm/index.d.ts +31 -0
- package/src/modules/components/AppConfirm/index.ts +1 -0
- package/src/modules/components/AppContextMenu/AppContextMenu.vue +100 -0
- package/src/modules/components/AppContextMenu/ShortcutItem.vue +37 -0
- package/src/modules/components/AppContextMenu/__mocks__/index.ts +25 -0
- package/src/modules/components/AppContextMenu/__tests__/app-context-menu.spec.ts +71 -0
- package/src/modules/components/AppContextMenu/__tests__/shortcut-item.spec.ts +29 -0
- package/src/modules/components/AppContextMenu/index.d.ts +23 -0
- package/src/modules/components/AppDataTable/AppDataTable.vue +323 -0
- package/src/modules/components/AppDataTable/AppDataTableFooter.vue +91 -0
- package/src/modules/components/AppDataTable/__mocks__/index.ts +71 -0
- package/src/modules/components/AppDataTable/__tests__/app-data-table-footer.spec.ts +107 -0
- package/src/modules/components/AppDataTable/__tests__/app-data-table.spec.ts +153 -0
- package/src/modules/components/AppDataTable/index.d.ts +29 -0
- package/src/modules/components/AppDefinitionList/AppDefinitionItem.vue +57 -0
- package/src/modules/components/AppDefinitionList/AppDefinitionList.vue +31 -0
- package/src/modules/components/AppDefinitionList/__mocks__/index.ts +31 -0
- package/src/modules/components/AppDefinitionList/__tests__/app-definition-item.spec.ts +93 -0
- package/src/modules/components/AppDefinitionList/__tests__/app-definition-list.spec.ts +35 -0
- package/src/modules/components/AppDefinitionList/index.d.ts +8 -0
- package/src/modules/components/AppDisclosure/AppDisclosure.vue +19 -0
- package/src/modules/components/AppDisclosure/AppDisclosureButton.vue +43 -0
- package/src/modules/components/AppDisclosure/AppDisclosurePanel.vue +31 -0
- package/src/modules/components/AppDisclosure/__tests__/app-disclosure-button.spec.ts +70 -0
- package/src/modules/components/AppDisclosure/__tests__/app-disclosure-panel.spec.ts +64 -0
- package/src/modules/components/AppDisclosure/__tests__/app-disclosure.spec.ts +41 -0
- package/src/modules/components/AppDrawer/AppDrawer.vue +149 -0
- package/src/modules/components/AppDrawer/__tests__/app-drawer.spec.ts +120 -0
- package/src/modules/components/AppDrawer/index.d.ts +27 -0
- package/src/modules/components/AppDropdownButton/AppDropdownButton.vue +82 -0
- package/src/modules/components/AppDropdownButton/AppDropdownItem.vue +67 -0
- package/src/modules/components/AppDropdownButton/__mocks__/index.ts +25 -0
- package/src/modules/components/AppDropdownButton/__tests__/app-dropdown-button.spec.ts +81 -0
- package/src/modules/components/AppDropdownButton/__tests__/app-dropdown-item.spec.ts +108 -0
- package/src/modules/components/AppDropdownButton/index.d.ts +26 -0
- package/src/modules/components/AppDropdownButton/index.ts +8 -0
- package/src/modules/components/AppError/AppError.vue +233 -0
- package/src/modules/components/AppError/__tests__/app-error.spec.ts +366 -0
- package/src/modules/components/AppError/index.d.ts +30 -0
- package/src/modules/components/AppError/index.ts +1 -0
- package/src/modules/components/AppImageDropzone/AppImageDropzone.vue +130 -0
- package/src/modules/components/AppImageDropzone/__tests__/app-image-dropzone.spec.ts +92 -0
- package/src/modules/components/AppImageDropzone/index.d.ts +8 -0
- package/src/modules/components/AppInput/AppInput.vue +247 -0
- package/src/modules/components/AppInput/FileInput.vue +58 -0
- package/src/modules/components/AppInput/Input.vue +141 -0
- package/src/modules/components/AppInput/InputIconSlot.vue +27 -0
- package/src/modules/components/AppInput/LocationInput.vue +150 -0
- package/src/modules/components/AppInput/__mocks__/location.ts +13 -0
- package/src/modules/components/AppInput/__tests__/app-input.spec.ts +255 -0
- package/src/modules/components/AppInput/__tests__/file-input.spec.ts +48 -0
- package/src/modules/components/AppInput/__tests__/input-icon-slot.spec.ts +27 -0
- package/src/modules/components/AppInput/__tests__/input.spec.ts +260 -0
- package/src/modules/components/AppInput/__tests__/location-input.spec.ts +159 -0
- package/src/modules/components/AppInput/choice.ts +24 -0
- package/src/modules/components/AppInput/datepicker.ts +62 -0
- package/src/modules/components/AppInput/index.d.ts +68 -0
- package/src/modules/components/AppInput/index.ts +133 -0
- package/src/modules/components/AppInput/location.ts +8 -0
- package/src/modules/components/AppInput/richText.ts +45 -0
- package/src/modules/components/AppInputLabel/AppInputLabel.vue +15 -0
- package/src/modules/components/AppInputLabel/__tests__/app-input-label.spec.ts +38 -0
- package/src/modules/components/AppInputLabel/index.d.ts +6 -0
- package/src/modules/components/AppLicensePlate/AppLicensePlate.vue +34 -0
- package/src/modules/components/AppLicensePlate/__tests__/app-license-plate.spec.ts +46 -0
- package/src/modules/components/AppLicensePlate/index.d.ts +1 -0
- package/src/modules/components/AppLoader/AppLoader.vue +37 -0
- package/src/modules/components/AppLoader/index.d.ts +1 -0
- package/src/modules/components/AppLoader/index.ts +8 -0
- package/src/modules/components/AppMaps/AppMaps.vue +105 -0
- package/src/modules/components/AppMaps/index.ts +44 -0
- package/src/modules/components/AppMenu/AppMenu.vue +79 -0
- package/src/modules/components/AppMenu/AppMenuItem.vue +40 -0
- package/src/modules/components/AppMenu/__mocks__/index.ts +23 -0
- package/src/modules/components/AppMenu/__tests__/app-menu-item.spec.ts +47 -0
- package/src/modules/components/AppMenu/__tests__/app-menu.spec.ts +53 -0
- package/src/modules/components/AppMenu/index.d.ts +15 -0
- package/src/modules/components/AppModal/AppModal.vue +261 -0
- package/src/modules/components/AppModal/__tests__/app-modal.spec.ts +282 -0
- package/src/modules/components/AppModal/index.d.ts +36 -0
- package/src/modules/components/AppNavigationMenu/AppNavigationMenu.vue +95 -0
- package/src/modules/components/AppNavigationMenu/Mobile.vue +126 -0
- package/src/modules/components/AppNavigationMenu/NavigationItem.vue +82 -0
- package/src/modules/components/AppNavigationMenu/SupportItem.vue +29 -0
- package/src/modules/components/AppNavigationMenu/__tests__/app-navigation-menu.spec.ts +104 -0
- package/src/modules/components/AppNavigationMenu/__tests__/mobile.spec.ts +155 -0
- package/src/modules/components/AppNavigationMenu/__tests__/navigation-item.spec.ts +91 -0
- package/src/modules/components/AppNavigationMenu/__tests__/support-item.spec.ts +48 -0
- package/src/modules/components/AppPagination/AppPagination.vue +133 -0
- package/src/modules/components/AppPagination/AppPaginationItem.vue +28 -0
- package/src/modules/components/AppPagination/__mocks__/index.ts +20 -0
- package/src/modules/components/AppPagination/__tests__/app-pagination.spec.ts +143 -0
- package/src/modules/components/AppPagination/index.d.ts +24 -0
- package/src/modules/components/AppProgressBar/AppProgressBar.vue +93 -0
- package/src/modules/components/AppProgressBar/AppProgressBarStep.vue +5 -0
- package/src/modules/components/AppProgressBar/__mocks__/index.ts +17 -0
- package/src/modules/components/AppProgressBar/__tests__/app-progress-bar-step.spec.ts +18 -0
- package/src/modules/components/AppProgressBar/__tests__/app-progress-bar.spec.ts +77 -0
- package/src/modules/components/AppProgressBar/index.d.ts +21 -0
- package/src/modules/components/AppRating/AppRating.vue +42 -0
- package/src/modules/components/AppRating/VueStarRating/Star.vue +215 -0
- package/src/modules/components/AppRating/VueStarRating/StarRating.vue +231 -0
- package/src/modules/components/AppRating/VueStarRating/classes/AlphaColor.ts +68 -0
- package/src/modules/components/AppRating/VueStarRating/readme.md +279 -0
- package/src/modules/components/AppRating/__tests__/app-rating.spec.ts +36 -0
- package/src/modules/components/AppSection/AppSection.vue +35 -0
- package/src/modules/components/AppSection/__tests__/app-section.spec.ts +53 -0
- package/src/modules/components/AppSelect/AppSelect.vue +176 -0
- package/src/modules/components/AppSelect/__mocks__/index.ts +24 -0
- package/src/modules/components/AppSelect/__tests__/app-select.spec.ts +73 -0
- package/src/modules/components/AppSelect/index.d.ts +43 -0
- package/src/modules/components/AppSelect/index.ts +69 -0
- package/src/modules/components/AppStepper/AppStepper.vue +79 -0
- package/src/modules/components/AppStepper/__tests__/app-stepper.spec.ts +59 -0
- package/src/modules/components/AppTable/AppTable.vue +40 -0
- package/src/modules/components/AppTimeline/AppTimeline.vue +22 -0
- package/src/modules/components/AppTimeline/AppTimelineItem.vue +97 -0
- package/src/modules/components/AppTimeline/AppTimelineItemIcon.vue +55 -0
- package/src/modules/components/AppTimeline/__mocks__/timeline.ts +29 -0
- package/src/modules/components/AppTimeline/__tests__/app-timeline-item-Icon.spec.ts +35 -0
- package/src/modules/components/AppTimeline/__tests__/app-timeline-item.spec.ts +121 -0
- package/src/modules/components/AppTimeline/__tests__/app-timeline.spec.ts +55 -0
- package/src/modules/components/AppTimeline/index.d.ts +30 -0
- package/src/modules/components/AppTimeline/index.ts +13 -0
- package/src/modules/components/AppToggle/AppToggle.vue +36 -0
- package/src/modules/components/AppToggle/__tests__/app-toggle.spec.ts +54 -0
- package/src/modules/components/AppToggle/index.d.ts +3 -0
- package/src/modules/components/AppToggleCard/AppToggleCard.vue +45 -0
- package/src/modules/components/AppToggleCard/__tests__/app-toggle-card.spec.ts +55 -0
- package/src/modules/components/index.ts +43 -0
- package/src/modules/composables/index.ts +13 -0
- package/src/modules/composables/useActionBar/__mocks__/index.ts +17 -0
- package/src/modules/composables/useActionBar/__tests__/index.spec.ts +62 -0
- package/src/modules/composables/useActionBar/index.d.ts +1 -0
- package/src/modules/composables/useActionBar/index.ts +67 -0
- package/src/modules/composables/useComputedPosition/index.d.ts +16 -0
- package/src/modules/composables/useComputedPosition/index.ts +199 -0
- package/src/modules/composables/useConfirm/__tests__/index.spec.ts +29 -0
- package/src/modules/composables/useConfirm/index.ts +63 -0
- package/src/modules/composables/useContextMenu/index.ts +127 -0
- package/src/modules/composables/useDrawer/__tests__/index.spec.ts +34 -0
- package/src/modules/composables/useDrawer/index.ts +136 -0
- package/src/modules/composables/useEcho/index.ts +167 -0
- package/src/modules/composables/useError/__tests__/index.spec.ts +29 -0
- package/src/modules/composables/useError/index.ts +61 -0
- package/src/modules/composables/useGoogleApi/__tests__/index.spec.ts +39 -0
- package/src/modules/composables/useGoogleApi/index.ts +26 -0
- package/src/modules/composables/useLayout/__tests__/index.spec.ts +34 -0
- package/src/modules/composables/useLayout/index.d.ts +1 -0
- package/src/modules/composables/useLayout/index.ts +68 -0
- package/src/modules/composables/useModal/__tests__/index.spec.ts +34 -0
- package/src/modules/composables/useModal/index.ts +97 -0
- package/src/modules/composables/useNavigation/__mocks__/navigation.ts +22 -0
- package/src/modules/composables/useNavigation/__tests__/index.spec.ts +88 -0
- package/src/modules/composables/useNavigation/index.d.ts +17 -0
- package/src/modules/composables/useNavigation/index.ts +97 -0
- package/src/modules/icons/BuildingCircleCheck.vue +32 -0
- package/src/modules/icons/BuildingCircleXmark.vue +20 -0
- package/src/modules/icons/CarsIcon.vue +29 -0
- package/src/modules/icons/ChatPersonRoundedIcon.vue +184 -0
- package/src/modules/icons/CompanyIcon.vue +18 -0
- package/src/modules/icons/HeroGirlIcon.vue +246 -0
- package/src/modules/icons/HeroPersonIcon.vue +402 -0
- package/src/modules/icons/HeroPersonRoundedIcon.vue +412 -0
- package/src/modules/icons/HeroPersonWithBgIcon.vue +4503 -0
- package/src/modules/icons/LocationMarkerIcon.vue +33 -0
- package/src/modules/icons/PartyPopperIcon.vue +146 -0
- package/src/modules/icons/index.ts +32 -0
- package/src/modules/icons/status/ErrorIcon.vue +24 -0
- package/src/modules/icons/status/SuccessIcon.vue +24 -0
- package/src/modules/icons/status/WarningIcon.vue +27 -0
- package/src/modules/icons/status/index.ts +3 -0
- package/src/modules/index.ts +8 -0
- package/src/modules/layouts/Auth/Auth.vue +36 -0
- package/src/modules/layouts/Auth/__tests__/auth.spec.ts +63 -0
- package/src/modules/layouts/Base/Base.vue +69 -0
- package/src/modules/layouts/Base/__tests__/base.spec.ts +56 -0
- package/src/modules/layouts/Platform/Platform.vue +96 -0
- package/src/modules/layouts/Platform/__tests__/platform.spec.ts +56 -0
- package/src/modules/layouts/index.ts +9 -0
- package/src/modules/plugins/Sentry/index.d.ts +16 -0
- package/src/modules/plugins/Sentry/index.ts +65 -0
- package/src/modules/plugins/Sentry/language/nl.ts +13 -0
- package/src/modules/plugins/TinyMCE/lang/nl.js +430 -0
- package/src/modules/plugins/Toast/Toast.vue +58 -0
- package/src/modules/plugins/Toast/__tests__/toast.spec.ts +90 -0
- package/src/modules/plugins/Toast/index.ts +36 -0
- package/src/modules/plugins/Toast/types.d.ts +265 -0
- package/src/modules/plugins/index.ts +63 -0
- package/src/stories/Introduction.mdx +4 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/images/logo.png +0 -0
- package/src/stories/assets/images/road.png +0 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/components/ActionBar/ActionBar.stories.ts +67 -0
- package/src/stories/components/Alert/Alert.stories.ts +53 -0
- package/src/stories/components/Avatar/Avatar.stories.ts +44 -0
- package/src/stories/components/BackButton/BackButton.stories.ts +39 -0
- package/src/stories/components/Badge/Badge.stories.ts +42 -0
- package/src/stories/components/Button/Button.stories.ts +132 -0
- package/src/stories/components/Card/Card.stories.ts +70 -0
- package/src/stories/components/Color/Color.stories.ts +41 -0
- package/src/stories/components/ColorCard/ColorCard.stories.ts +43 -0
- package/src/stories/components/Confirm/Confirm.stories.ts +110 -0
- package/src/stories/components/ContextMenu/ContextMenu.stories.ts +85 -0
- package/src/stories/components/DefinitionList/DefinitionList.stories.ts +32 -0
- package/src/stories/components/Disclosure/Disclosure.stories.ts +61 -0
- package/src/stories/components/DropdownButton/DropdownButton.stories.ts +121 -0
- package/src/stories/components/Error/Error.stories.ts +106 -0
- package/src/stories/components/ImageDropzone/ImageDropzone.stories.ts +41 -0
- package/src/stories/components/Input/Input.stories.ts +180 -0
- package/src/stories/components/Input/LocationInput.stories.ts +77 -0
- package/src/stories/components/LicensePlate/LicensePlate.stories.ts +39 -0
- package/src/stories/components/Maps/Maps.stories.ts +36 -0
- package/src/stories/components/Menu/Menu.stories.ts +41 -0
- package/src/stories/components/Modal/Modal.stories.ts +68 -0
- package/src/stories/components/Navigation/Navigation.stories.ts +62 -0
- package/src/stories/components/Pagination/Pagination.stories.ts +62 -0
- package/src/stories/components/ProgressBar/ProgressBar.stories.ts +48 -0
- package/src/stories/components/Rating/Rating.stories.ts +38 -0
- package/src/stories/components/Section/Section.stories.ts +44 -0
- package/src/stories/components/Select/Select.stories.ts +90 -0
- package/src/stories/components/Stepper/Stepper.stories.ts +38 -0
- package/src/stories/components/Table/DataTable.stories.ts +96 -0
- package/src/stories/components/Table/Table.stories.ts +45 -0
- package/src/stories/components/Timeline/Timeline.stories.ts +46 -0
- package/src/stories/components/Toast/Toast.stories.ts +47 -0
- package/src/stories/components/Toggle/Toggle.stories.ts +41 -0
- package/src/stories/components/ToggleCard/ToggleCard.stories.ts +43 -0
- package/src/stories/layouts/Auth.stories.ts +43 -0
- package/src/stories/layouts/Base.stories.ts +70 -0
- package/src/tests/mocks/resize-observer.ts +13 -0
- package/src/tests/stubs/AppSelect.ts +89 -0
- package/src/tests/stubs/HeadlessUiDialogStub.ts +24 -0
- package/src/tests/stubs/HeadlessUiTransitionChildStub.ts +20 -0
- package/src/tests/stubs/HeadlessUiTransitionRootStub.ts +25 -0
- package/src/tests/stubs/IconStub.ts +9 -0
- package/src/tests/stubs/Vue3EasyDataTableStub.ts +53 -0
- package/src/typings/plugin.d.ts +5 -0
- package/src/typings/shims-vue.d.ts +13 -0
- package/src/typings/utilities.d.ts +4 -0
- package/src/typings/vite-environment.d.ts +12 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
--text-*: initial;
|
|
3
|
+
--text-4xl: 1.953rem;
|
|
4
|
+
--text-4xl--line-height: 2rem;
|
|
5
|
+
--text-3xl: 1.563rem;
|
|
6
|
+
--text-3xl--line-height: 2rem;
|
|
7
|
+
--text-2xl: 1.25rem;
|
|
8
|
+
--text-2xl--line-height: 1.75rem;
|
|
9
|
+
--text-xl: 1.125rem;
|
|
10
|
+
--text-xl--line-height: 1.75rem;
|
|
11
|
+
--text-lg: 1rem;
|
|
12
|
+
--text-lg--line-height: 1.5rem;
|
|
13
|
+
--text-base: 0.875rem;
|
|
14
|
+
--text-base--line-height: 1.375rem;
|
|
15
|
+
--text-sm: 0.875rem;
|
|
16
|
+
--text-sm--line-height: 1.375rem;
|
|
17
|
+
--text-xs: 0.625rem;
|
|
18
|
+
--text-xs--line-height: 0.75rem;
|
|
19
|
+
--text-xxs: 0.625rem;
|
|
20
|
+
--text-xxs--line-height: 0.75rem;
|
|
21
|
+
|
|
22
|
+
--font-*: initial;
|
|
23
|
+
--font-sans: Inter;
|
|
24
|
+
--font-serif: Inter;
|
|
25
|
+
--font-mono: Inter;
|
|
26
|
+
|
|
27
|
+
--color-*: initial;
|
|
28
|
+
--color-current: currentColor;
|
|
29
|
+
--color-transparent: transparent;
|
|
30
|
+
--color-primary: rgb(71 166 220);
|
|
31
|
+
--color-primary-active: rgb(29 132 191);
|
|
32
|
+
|
|
33
|
+
--color-secondary: rgb(50 47 49);
|
|
34
|
+
--color-secondary-active: rgb(0 0 0);
|
|
35
|
+
|
|
36
|
+
--color-black-50: #fcfcfd;
|
|
37
|
+
--color-black-100: #202020;
|
|
38
|
+
--color-black-black: #000000;
|
|
39
|
+
--color-black: #1e1e1e;
|
|
40
|
+
|
|
41
|
+
--color-white: #ffffff;
|
|
42
|
+
--color-error: #dc2626;
|
|
43
|
+
|
|
44
|
+
--color-zinc-50: #fafafa;
|
|
45
|
+
--color-zinc-100: #f4f4f5;
|
|
46
|
+
--color-zinc-200: #e4e4e7;
|
|
47
|
+
--color-zinc-300: #d4d4d8;
|
|
48
|
+
--color-zinc-400: #a1a1aa;
|
|
49
|
+
--color-zinc-500: #71717a;
|
|
50
|
+
--color-zinc-600: #52525b;
|
|
51
|
+
--color-zinc-700: #3f3f46;
|
|
52
|
+
--color-zinc-800: #27272a;
|
|
53
|
+
--color-zinc-900: #18181b;
|
|
54
|
+
|
|
55
|
+
--color-yellow-50: #fefce8;
|
|
56
|
+
--color-yellow-100: #fef9c3;
|
|
57
|
+
--color-yellow-200: #fef08a;
|
|
58
|
+
--color-yellow-300: #fde047;
|
|
59
|
+
--color-yellow-400: #facc15;
|
|
60
|
+
--color-yellow-500: #eab308;
|
|
61
|
+
--color-yellow-600: #ca8a04;
|
|
62
|
+
--color-yellow-700: #a16207;
|
|
63
|
+
--color-yellow-800: #854d0e;
|
|
64
|
+
--color-yellow-900: #713f12;
|
|
65
|
+
|
|
66
|
+
--color-red-50: #fef2f2;
|
|
67
|
+
--color-red-100: #fee2e2;
|
|
68
|
+
--color-red-200: #fecaca;
|
|
69
|
+
--color-red-300: #fca5a5;
|
|
70
|
+
--color-red-400: #f87171;
|
|
71
|
+
--color-red-500: #ef4444;
|
|
72
|
+
--color-red-600: #dc2626;
|
|
73
|
+
--color-red-700: #b91c1c;
|
|
74
|
+
--color-red-800: #991b1b;
|
|
75
|
+
--color-red-900: #7f1d1d;
|
|
76
|
+
|
|
77
|
+
--color-green-50: #f0fdf4;
|
|
78
|
+
--color-green-100: #dcfce7;
|
|
79
|
+
--color-green-200: #bbf7d0;
|
|
80
|
+
--color-green-300: #86efac;
|
|
81
|
+
--color-green-400: #4ade80;
|
|
82
|
+
--color-green-500: #22c55e;
|
|
83
|
+
--color-green-600: #16a34a;
|
|
84
|
+
--color-green-700: #15803d;
|
|
85
|
+
--color-green-800: #166534;
|
|
86
|
+
--color-green-900: #14532d;
|
|
87
|
+
|
|
88
|
+
--color-indigo-200: #c7d2fe;
|
|
89
|
+
--color-indigo-600: #4f46e5;
|
|
90
|
+
--color-indigo-900: #162c87;
|
|
91
|
+
|
|
92
|
+
--color-lime-200: #d9f99d;
|
|
93
|
+
--color-lime-600: #65a30d;
|
|
94
|
+
|
|
95
|
+
--color-amber-200: #fde68a;
|
|
96
|
+
--color-amber-600: #d97706;
|
|
97
|
+
|
|
98
|
+
--color-orange-200: #fed7aa;
|
|
99
|
+
--color-orange-500: #e25c2a;
|
|
100
|
+
|
|
101
|
+
--color-sky-200: #bae6fd;
|
|
102
|
+
--color-sky-600: #0284c7;
|
|
103
|
+
|
|
104
|
+
--color-teal-200: #99f6e4;
|
|
105
|
+
--color-teal-600: #0d9488;
|
|
106
|
+
|
|
107
|
+
--color-violet-200: #ddd6fe;
|
|
108
|
+
--color-violet-600: #7c3aed;
|
|
109
|
+
|
|
110
|
+
--color-blue-200: #bfdbfe;
|
|
111
|
+
--color-blue-600: #2563eb;
|
|
112
|
+
|
|
113
|
+
--color-gold-200: #fde68a;
|
|
114
|
+
--color-gold-600: #d97706;
|
|
115
|
+
|
|
116
|
+
--color-pink-200: #fbcfe8;
|
|
117
|
+
--color-pink-600: #db2777;
|
|
118
|
+
|
|
119
|
+
--breakpoint-*: initial;
|
|
120
|
+
--breakpoint-xxs: 480px;
|
|
121
|
+
--breakpoint-xs: 600px;
|
|
122
|
+
--breakpoint-sm: 768px;
|
|
123
|
+
--breakpoint-md: 992px;
|
|
124
|
+
--breakpoint-lg: 1200px;
|
|
125
|
+
--breakpoint-xl: 1440px;
|
|
126
|
+
--breakpoint-2xl: 1800px;
|
|
127
|
+
|
|
128
|
+
--spacing-141: 34.375rem;
|
|
129
|
+
--spacing-4_5: 1.2rem;
|
|
130
|
+
|
|
131
|
+
--height-18: 4.5rem;
|
|
132
|
+
|
|
133
|
+
--width-110: 27.5rem;
|
|
134
|
+
--width-141: 34.375rem;
|
|
135
|
+
--width-full-plus8: calc(100% + 2rem);
|
|
136
|
+
|
|
137
|
+
--max-height-160: 40rem;
|
|
138
|
+
|
|
139
|
+
--border-width-6: 6px;
|
|
140
|
+
--border-width-10: 10px;
|
|
141
|
+
--border-width-12: 12px;
|
|
142
|
+
--border-width-4_5: 1.2rem;
|
|
143
|
+
|
|
144
|
+
--scale-flip: -1;
|
|
145
|
+
|
|
146
|
+
--stroke-width-3: 3px;
|
|
147
|
+
--stroke-width-4: 4px;
|
|
148
|
+
|
|
149
|
+
--drop-shadow-card: 0px 4px 2px rgba(21, 21, 21, 0.08);
|
|
150
|
+
--drop-shadow-cardhighlight: 1px 4px 3px rgba(21, 21, 21, 0.16);
|
|
151
|
+
|
|
152
|
+
--transition-property-font: font-weight, font-size, line-height;
|
|
153
|
+
|
|
154
|
+
--z-index-100: 100;
|
|
155
|
+
|
|
156
|
+
--background-image-multiselect-caret: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='currentColor' class='w-6 h-6'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3e%3c/svg%3e");
|
|
157
|
+
--background-image-multiselect-spinner: url("data:image/svg+xml,%3csvg viewBox='0 0 512 512' fill='undefined' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M456.433 371.72l-27.79-16.045c-7.192-4.152-10.052-13.136-6.487-20.636 25.82-54.328 23.566-118.602-6.768-171.03-30.265-52.529-84.802-86.621-144.76-91.424C262.35 71.922 256 64.953 256 56.649V24.56c0-9.31 7.916-16.609 17.204-15.96 81.795 5.717 156.412 51.902 197.611 123.408 41.301 71.385 43.99 159.096 8.042 232.792-4.082 8.369-14.361 11.575-22.424 6.92z'%3e%3c/path%3e%3c/svg%3e");
|
|
158
|
+
--background-image-multiselect-remove: url("data:image/svg+xml,%3csvg viewBox='0 0 320 512' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z'%3e%3c/path%3e%3c/svg%3e");
|
|
159
|
+
--background-image-nature: url('/images/nature.svg');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@utility container {
|
|
163
|
+
margin-inline: auto;
|
|
164
|
+
@media (width >= --theme(--breakpoint-xxs)) {
|
|
165
|
+
max-width: none;
|
|
166
|
+
}
|
|
167
|
+
@media (width >= 600px) {
|
|
168
|
+
max-width: 600px;
|
|
169
|
+
}
|
|
170
|
+
@media (width >= 728px) {
|
|
171
|
+
max-width: 728px;
|
|
172
|
+
}
|
|
173
|
+
@media (width >= 984px) {
|
|
174
|
+
max-width: 984px;
|
|
175
|
+
}
|
|
176
|
+
@media (width >= 1240px) {
|
|
177
|
+
max-width: 1240px;
|
|
178
|
+
}
|
|
179
|
+
@media (width >= 1400px) {
|
|
180
|
+
max-width: 1400px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/*
|
|
185
|
+
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
186
|
+
so we've added these compatibility styles to make sure everything still
|
|
187
|
+
looks the same as it did with Tailwind CSS v3.
|
|
188
|
+
|
|
189
|
+
If we ever want to remove these styles, we need to add an explicit border
|
|
190
|
+
color utility to any element that depends on these defaults.
|
|
191
|
+
*/
|
|
192
|
+
@layer base {
|
|
193
|
+
*,
|
|
194
|
+
::after,
|
|
195
|
+
::before,
|
|
196
|
+
::backdrop,
|
|
197
|
+
::file-selector-button {
|
|
198
|
+
border-color: var(--color-gray-200, currentColor);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@layer base {
|
|
203
|
+
body {
|
|
204
|
+
@apply text-zinc-700 overflow-x-hidden;
|
|
205
|
+
|
|
206
|
+
-webkit-tap-highlight-color: transparent;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@reference "./main.css";
|
|
2
|
+
|
|
3
|
+
.tox-tinymce {
|
|
4
|
+
@apply border! border-zinc-300!;
|
|
5
|
+
}
|
|
6
|
+
.tox:not(.tox-tinymce-inline) .tox-editor-header {
|
|
7
|
+
@apply shadow-none! border-b! border-solid! border-b-zinc-300!;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.tox .tox-tbtn {
|
|
11
|
+
@apply cursor-pointer hover:!bg-zinc-100;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.tox .tox-tbtn--enabled, .tox .tox-tbtn--enabled:hover {
|
|
15
|
+
@apply bg-zinc-300!;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.tox .tox-toolbar-overlord>.tox-toolbar, .tox .tox-toolbar-overlord>.tox-toolbar__overflow, .tox .tox-toolbar-overlord>.tox-toolbar__primary {
|
|
19
|
+
@apply divide-zinc-300 divide-x;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tox .tox-toolbar__group {
|
|
23
|
+
@apply border-zinc-300!;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
.tox .tox-listboxfield .tox-listbox--select, .tox .tox-textarea, .tox .tox-textarea-wrap .tox-textarea:focus, .tox .tox-textfield, .tox .tox-toolbar-textfield {
|
|
28
|
+
@apply border-zinc-300 px-5 block w-full appearance-none rounded-lg
|
|
29
|
+
placeholder:text-zinc-300 focus:outline-none text-base
|
|
30
|
+
disabled:cursor-not-allowed disabled:border-zinc-100 disabled:bg-zinc-100
|
|
31
|
+
read-only:cursor-default read-only:border-zinc-300 read-only:bg-zinc-100 py-3 h-[42px] border bg-white focus:ring-1 focus:ring-zinc-300 hover:bg-zinc-100;
|
|
32
|
+
|
|
33
|
+
font-size: 14px !important;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.tox .tox-custom-editor:focus-within, .tox .tox-listboxfield .tox-listbox--select:focus, .tox .tox-textarea-wrap:focus-within, .tox .tox-textarea:focus, .tox .tox-textfield:focus {
|
|
37
|
+
@apply ring-1! ring-zinc-300! border-zinc-300!;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.tox .tox-label, .tox .tox-toolbar-label {
|
|
41
|
+
@apply mb-2! block! text-base! font-semibold! text-zinc-900!;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tox .tox-form__group {
|
|
45
|
+
@apply mb-4!;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tox button.tox-button:not(.tox-button--naked) {
|
|
49
|
+
@apply text-white bg-primary border-transparent hover:bg-primary-active hover:border-transparent px-5 py-2.5 h-[42px] inline-flex cursor-pointer items-center whitespace-nowrap rounded-lg border text-base font-semibold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:select-none disabled:opacity-50;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tox button.tox-button--secondary:not(.tox-button--naked) {
|
|
53
|
+
@apply text-white bg-secondary border-transparent hover:text-white enabled:hover:bg-secondary-active hover:border-transparent px-5 py-2.5 h-[42px] inline-flex cursor-pointer items-center whitespace-nowrap rounded-lg border text-base font-semibold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:select-none disabled:opacity-50;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.tox .tox-listbox__select-label {
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
}
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createApp } from 'vue';
|
|
2
|
+
import UILibrary from '~/modules';
|
|
3
|
+
import App from './App.vue';
|
|
4
|
+
|
|
5
|
+
import './css/build.css';
|
|
6
|
+
import './css/main.css';
|
|
7
|
+
import { createRouter, createWebHistory } from 'vue-router';
|
|
8
|
+
import { useGoogleApi } from './modules/composables';
|
|
9
|
+
|
|
10
|
+
const app = createApp(App);
|
|
11
|
+
|
|
12
|
+
app.use(UILibrary);
|
|
13
|
+
|
|
14
|
+
useGoogleApi().load(import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? '');
|
|
15
|
+
|
|
16
|
+
const router = createRouter({
|
|
17
|
+
history: createWebHistory(),
|
|
18
|
+
routes: [
|
|
19
|
+
{
|
|
20
|
+
path: '/',
|
|
21
|
+
name: 'playground',
|
|
22
|
+
component: async () => import('./Playground.vue'),
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
path: '/home',
|
|
26
|
+
name: 'home',
|
|
27
|
+
component: async () => import('./Playground.vue'),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
app.use(router);
|
|
33
|
+
|
|
34
|
+
app.mount('#app');
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, ref, useTemplateRef, watch } from 'vue';
|
|
3
|
+
import { onKeyStroke } from '@vueuse/core';
|
|
4
|
+
import { XMarkIcon } from '~icons';
|
|
5
|
+
import { useActionBar, useComputedPosition } from '~composables';
|
|
6
|
+
import AppActionBarItem from '~components/AppActionBar/AppActionBarItem.vue';
|
|
7
|
+
import AppInput from '~components/AppInput/AppInput.vue';
|
|
8
|
+
|
|
9
|
+
const actionBar = useTemplateRef('actionBar');
|
|
10
|
+
const { selection, actions, isOpen, close, resetSelection, selectionText } = useActionBar();
|
|
11
|
+
const { setComputedPosition } = useComputedPosition(
|
|
12
|
+
() => document.getElementById('sidebar-left-wrapper'),
|
|
13
|
+
actionBar,
|
|
14
|
+
{
|
|
15
|
+
active: true,
|
|
16
|
+
placement: 'left-start',
|
|
17
|
+
mainAxis: 0,
|
|
18
|
+
sizeElement: '#sidebar-wrapper',
|
|
19
|
+
},
|
|
20
|
+
);
|
|
21
|
+
const selected = ref([1]);
|
|
22
|
+
|
|
23
|
+
const selectionTextWithValue = computed((): string => {
|
|
24
|
+
return selectionText.value.replace(':selection', String(selection.value.length));
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
watch(isOpen, () => setComputedPosition());
|
|
28
|
+
watch(selection, () => {
|
|
29
|
+
if (selection.value.length === 0) {
|
|
30
|
+
close();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
function changeSelection(): void {
|
|
35
|
+
selected.value = [1];
|
|
36
|
+
|
|
37
|
+
resetSelection();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function closeActionBar(): void {
|
|
41
|
+
resetSelection();
|
|
42
|
+
|
|
43
|
+
close();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
onKeyStroke(['Escape'], (event: Event) => {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
|
|
49
|
+
closeActionBar();
|
|
50
|
+
});
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<Teleport to="body">
|
|
55
|
+
<div
|
|
56
|
+
ref="actionBar"
|
|
57
|
+
:class="{ 'translate-y-0! max-md:mt-0!': selection.length > 0 && isOpen }"
|
|
58
|
+
class="fixed inset-x-0 top-0 z-100 flex h-14 md:-mt-1 -translate-y-24 items-center justify-between bg-secondary
|
|
59
|
+
px-4 text-white transition-[translate] ease-in-out max-md:transform-none! max-md:translate-none! max-md:-mt-10"
|
|
60
|
+
data-test-action-bar-wrapper
|
|
61
|
+
>
|
|
62
|
+
<div class="flex py-4.5">
|
|
63
|
+
<!-- @vue-ignore -->
|
|
64
|
+
<AppInput
|
|
65
|
+
v-model="selected"
|
|
66
|
+
:value="1"
|
|
67
|
+
type="checkbox"
|
|
68
|
+
@change="changeSelection"
|
|
69
|
+
/>
|
|
70
|
+
|
|
71
|
+
<div
|
|
72
|
+
class="w-28 whitespace-nowrap pl-2"
|
|
73
|
+
data-test-selection-text
|
|
74
|
+
>
|
|
75
|
+
{{ selectionTextWithValue }}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="flex">
|
|
80
|
+
<AppActionBarItem
|
|
81
|
+
v-for="(action, index) in actions"
|
|
82
|
+
:key="`action-item-${index}`"
|
|
83
|
+
:action="action"
|
|
84
|
+
@close="closeActionBar"
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div>
|
|
89
|
+
<XMarkIcon
|
|
90
|
+
class="size-5 cursor-pointer"
|
|
91
|
+
@click="closeActionBar"
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</Teleport>
|
|
96
|
+
</template>
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, onMounted, ref, toValue, useTemplateRef } from 'vue';
|
|
3
|
+
import { onClickOutside } from '@vueuse/core';
|
|
4
|
+
import { WarningIcon } from '~icons';
|
|
5
|
+
import { AppLoader } from '~components';
|
|
6
|
+
import { useActionBar, useContextMenu } from '~composables';
|
|
7
|
+
import AppActionBarSubMenu from './AppActionBarSubMenu.vue';
|
|
8
|
+
import { domClassesPerMenu, domClassesPerType } from '.';
|
|
9
|
+
|
|
10
|
+
import type { ActionItemProps, Type } from './index.d';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
|
+
const props = withDefaults(defineProps<ActionItemProps>(), {
|
|
14
|
+
item: undefined,
|
|
15
|
+
context: false,
|
|
16
|
+
confirmed: false,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const emit = defineEmits<{ (event: 'close'): void }>();
|
|
20
|
+
|
|
21
|
+
const actionBar = useActionBar();
|
|
22
|
+
const contextMenu = useContextMenu();
|
|
23
|
+
const actionBarElement = useTemplateRef<HTMLDivElement>('actionBarItem');
|
|
24
|
+
const confirm = ref(false);
|
|
25
|
+
const loading = ref(false);
|
|
26
|
+
const modelValueSubMenu = ref<number[]>([]);
|
|
27
|
+
|
|
28
|
+
const icon = computed(() => {
|
|
29
|
+
if (loading.value) {
|
|
30
|
+
return AppLoader;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (confirm.value && props.action.confirm) {
|
|
34
|
+
return WarningIcon;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return props.action.icon;
|
|
38
|
+
});
|
|
39
|
+
const type = computed((): Type => props.action.type ?? 'default');
|
|
40
|
+
const itemHidden = computed(() => {
|
|
41
|
+
if (typeof props.action.hidden === 'function') {
|
|
42
|
+
// @ts-expect-error item not in unknown
|
|
43
|
+
if (props.context && contextMenu.item) {
|
|
44
|
+
// @ts-expect-error item not in unknown
|
|
45
|
+
return props.action.hidden([toValue(contextMenu.item)], true);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return props.action.hidden(actionBar.tableSelection.value, false);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return props.action.hidden;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
if (props.confirmed) {
|
|
56
|
+
confirm.value = true;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
async function onClickAction(): Promise<void> {
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
62
|
+
if ((props.action.confirm || props.action.component) && !confirm.value) {
|
|
63
|
+
confirm.value = true;
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
loading.value = true;
|
|
68
|
+
confirm.value = false;
|
|
69
|
+
|
|
70
|
+
const closeOnComplete = await props.action.onClick?.(props.item ?? actionBar.tableSelection.value);
|
|
71
|
+
|
|
72
|
+
loading.value = false;
|
|
73
|
+
|
|
74
|
+
if (props.action?.resetSelection ?? true) {
|
|
75
|
+
actionBar.resetSelection();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (closeOnComplete) {
|
|
79
|
+
emit('close');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function subMenuClose(): void {
|
|
84
|
+
confirm.value = false;
|
|
85
|
+
|
|
86
|
+
emit('close');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
onClickOutside(actionBarElement, () => {
|
|
90
|
+
confirm.value = false;
|
|
91
|
+
});
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<template>
|
|
95
|
+
<div
|
|
96
|
+
v-if="itemHidden !== true"
|
|
97
|
+
ref="actionBarItem"
|
|
98
|
+
:class="[...domClassesPerType[type], ...domClassesPerMenu[props.context ? 'contextMenu' : 'actionBar']]"
|
|
99
|
+
class="relative cursor-pointer rounded-md transition-colors duration-200"
|
|
100
|
+
>
|
|
101
|
+
<div
|
|
102
|
+
v-tippy="context ? undefined : action.name"
|
|
103
|
+
:class="{ 'px-2.5 py-4': !context }"
|
|
104
|
+
class="flex size-full items-center space-x-2 whitespace-nowrap"
|
|
105
|
+
data-test-action-bar-icon
|
|
106
|
+
@click="onClickAction"
|
|
107
|
+
>
|
|
108
|
+
<Component
|
|
109
|
+
:is="icon"
|
|
110
|
+
:class="{ 'text-yellow-600': confirm && action.confirm, 'size-4': context, 'size-5': !context, 'size-5!': loading }"
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<slot></slot>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<AppActionBarSubMenu
|
|
117
|
+
v-if="props.action.component && confirm"
|
|
118
|
+
v-model="modelValueSubMenu"
|
|
119
|
+
v-bind="props"
|
|
120
|
+
@close="subMenuClose"
|
|
121
|
+
/>
|
|
122
|
+
</div>
|
|
123
|
+
</template>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, defineAsyncComponent, useTemplateRef } from 'vue';
|
|
3
|
+
import { pascal } from 'radash';
|
|
4
|
+
import { useParentElement } from '@vueuse/core';
|
|
5
|
+
import { flip, offset, shift, limitShift, arrow } from '@floating-ui/vue';
|
|
6
|
+
import { useComputedPosition } from '~composables';
|
|
7
|
+
import { byPrefixAndName, FontAwesomeIcon } from '~icons';
|
|
8
|
+
import Loading from './Components/Loading.vue';
|
|
9
|
+
import Error from './Components/Error.vue';
|
|
10
|
+
import { arrowClassPerMenu } from './index';
|
|
11
|
+
|
|
12
|
+
import type { ActionItemProps } from './index.d';
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line vue/no-unused-properties
|
|
15
|
+
const props = withDefaults(defineProps<ActionItemProps>(), {
|
|
16
|
+
item: undefined,
|
|
17
|
+
context: false,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const emit = defineEmits<{ close: [] }>();
|
|
21
|
+
|
|
22
|
+
const parentElement = useParentElement();
|
|
23
|
+
const subMenuElement = useTemplateRef<HTMLDivElement>('subMenu');
|
|
24
|
+
const arrowElement = useTemplateRef<HTMLDivElement>('submenuArrow');
|
|
25
|
+
const { position } = useComputedPosition(parentElement, subMenuElement, {
|
|
26
|
+
placement: props.context ? 'right-start' : 'bottom',
|
|
27
|
+
middleware: [
|
|
28
|
+
offset({ mainAxis: props.context ? 25 : 20, crossAxis: 0 }),
|
|
29
|
+
shift({ padding: props.context ? 25 : 20, limiter: limitShift() }),
|
|
30
|
+
flip({ mainAxis: true, crossAxis: true }),
|
|
31
|
+
arrow({ element: arrowElement }),
|
|
32
|
+
],
|
|
33
|
+
});
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
35
|
+
const MenuComponent = defineAsyncComponent({
|
|
36
|
+
loader: async () => {
|
|
37
|
+
if (typeof props.action.component === 'string') {
|
|
38
|
+
return import(`./Components/${pascal(props.action.component)}.vue`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return props.action.component;
|
|
42
|
+
},
|
|
43
|
+
errorComponent: Error,
|
|
44
|
+
loadingComponent: Loading,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const horizontalPlacement = computed((): 'left' | 'right' => (`${position.value?.placement}`.startsWith('left') ? 'left' : 'right'));
|
|
48
|
+
const arrowHorizontal = computed((): number | null => position.value?.middlewareData?.arrow?.x ?? null);
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<div
|
|
53
|
+
ref="subMenu"
|
|
54
|
+
:class="{ '-top-full left-full': props.context }"
|
|
55
|
+
class="absolute w-fit rounded-lg bg-secondary p-2"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
ref="submenuArrow"
|
|
59
|
+
:class="{
|
|
60
|
+
'-translate-x-6 -ml-px': horizontalPlacement === 'right',
|
|
61
|
+
'translate-x-4': horizontalPlacement === 'left',
|
|
62
|
+
hidden: !props.context,
|
|
63
|
+
}"
|
|
64
|
+
:style="{
|
|
65
|
+
left: arrowHorizontal !== null && horizontalPlacement === 'right' ? `${arrowHorizontal}px` : '',
|
|
66
|
+
right: horizontalPlacement === 'left' ? `${arrowHorizontal ?? 0}px` : '',
|
|
67
|
+
top: position?.middlewareData?.arrow?.y !== null ? `${position?.middlewareData?.arrow?.y}px` : '',
|
|
68
|
+
}"
|
|
69
|
+
class="absolute text-secondary size-8"
|
|
70
|
+
>
|
|
71
|
+
<FontAwesomeIcon
|
|
72
|
+
:icon="byPrefixAndName.fas['caret-left']"
|
|
73
|
+
:class="{ 'rotate-180': horizontalPlacement === 'left' }"
|
|
74
|
+
class="size-full!"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div
|
|
79
|
+
:class="arrowClassPerMenu[props.context ? 'contextMenu' : 'actionBar']"
|
|
80
|
+
class="relative w-fit before:absolute before:-translate-x-3"
|
|
81
|
+
>
|
|
82
|
+
<MenuComponent
|
|
83
|
+
v-bind="{ ...props, ...action.componentProperties }"
|
|
84
|
+
data-test-action-menu
|
|
85
|
+
@close="() => emit('close')"
|
|
86
|
+
/>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</template>
|