@vc-shell/framework 1.1.99-alpha.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/api/platform.ts +9883 -9883
- package/core/composables/useDynamicProperties/index.ts +16 -10
- package/core/composables/useNotifications/index.ts +1 -32
- package/core/composables/useSettings/index.ts +3 -8
- package/core/composables/useUser/index.ts +171 -74
- package/core/composables/useUserManagement/index.ts +25 -67
- package/core/interceptors/index.ts +56 -19
- package/core/plugins/signalR/index.ts +1 -27
- package/core/types/index.ts +0 -2
- package/dist/core/api/platform.d.ts +1 -1
- package/dist/core/api/platform.d.ts.map +1 -1
- package/dist/core/composables/useDynamicProperties/index.d.ts.map +1 -1
- package/dist/core/composables/useNotifications/index.d.ts.map +1 -1
- package/dist/core/composables/useSettings/index.d.ts.map +1 -1
- package/dist/core/composables/useUser/index.d.ts +9 -18
- package/dist/core/composables/useUser/index.d.ts.map +1 -1
- package/dist/core/composables/useUserManagement/index.d.ts +7 -7
- package/dist/core/composables/useUserManagement/index.d.ts.map +1 -1
- package/dist/core/interceptors/index.d.ts +1 -2
- package/dist/core/interceptors/index.d.ts.map +1 -1
- package/dist/core/plugins/signalR/index.d.ts +0 -2
- package/dist/core/plugins/signalR/index.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/injection-keys.d.ts +1 -2
- package/dist/injection-keys.d.ts.map +1 -1
- package/dist/shared/components/app-switcher/composables/useAppSwitcher/index.d.ts.map +1 -1
- package/dist/shared/components/multilanguage-selector/multilanguage-selector.vue.d.ts +1 -1
- package/dist/shared/components/notifications/components/notification-container/index.d.ts +10 -10
- package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts +1 -1
- package/dist/shared/components/sign-in/useExternalProvider.d.ts.map +1 -1
- package/dist/shared/modules/assets-manager/components/assets-manager/assets-manager.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/helpers/nodeBuilder.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +2 -2
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +1 -1
- package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +1 -1
- package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts +2 -2
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts +1 -1
- package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/index.d.ts +1 -0
- package/dist/ui/components/molecules/index.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts +34 -0
- package/dist/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-accordion/index.d.ts +7 -0
- package/dist/ui/components/molecules/vc-accordion/index.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts +42 -0
- package/dist/ui/components/molecules/vc-accordion/vc-accordion.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts +2 -2
- package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-rating/vc-rating.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/vc-app-menu-item.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-base-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/_internal/vc-blade-toolbar-button/vc-blade-toolbar-circle-button.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.backupsb.d.ts +3 -3
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +5 -5
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-body/vc-table-body.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/_internal/vc-table-row/vc-table-row.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-desktop-view/vc-table-desktop-view.vue.d.ts +3 -3
- package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +1 -1
- package/package.json +5 -7
- package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +2 -2
- package/shared/components/app-switcher/composables/useAppSwitcher/index.ts +1 -15
- package/shared/components/sign-in/useExternalProvider.ts +1 -11
- package/shared/modules/dynamic/helpers/nodeBuilder.ts +3 -11
- package/ui/components/atoms/vc-badge/vc-badge.stories.ts +1 -1
- package/ui/components/atoms/vc-button/vc-button.stories.ts +1 -1
- package/ui/components/atoms/vc-card/vc-card.stories.ts +1 -1
- package/ui/components/atoms/vc-col/vc-col.stories.ts +1 -1
- package/ui/components/atoms/vc-container/vc-container.stories.ts +1 -1
- package/ui/components/atoms/vc-hint/vc-hint.stories.ts +1 -1
- package/ui/components/atoms/vc-icon/vc-icon.stories.ts +1 -1
- package/ui/components/atoms/vc-image/vc-image.stories.ts +1 -1
- package/ui/components/atoms/vc-label/vc-label.stories.ts +1 -1
- package/ui/components/atoms/vc-link/vc-link.stories.ts +1 -1
- package/ui/components/atoms/vc-progress/vc-progress.stories.ts +1 -1
- package/ui/components/atoms/vc-row/vc-row.stories.ts +1 -1
- package/ui/components/atoms/vc-skeleton/vc-skeleton.stories.ts +1 -1
- package/ui/components/atoms/vc-status/vc-status.stories.ts +1 -1
- package/ui/components/atoms/vc-status-icon/vc-status-icon.stories.ts +1 -1
- package/ui/components/atoms/vc-tooltip/vc-tooltip.stories.ts +1 -1
- package/ui/components/atoms/vc-video/vc-video.stories.ts +1 -1
- package/ui/components/atoms/vc-widget/vc-widget.stories.ts +1 -1
- package/ui/components/molecules/index.ts +1 -0
- package/ui/components/molecules/vc-accordion/_internal/vc-accordion-item/vc-accordion-item.vue +251 -0
- package/ui/components/molecules/vc-accordion/index.ts +11 -0
- package/ui/components/molecules/vc-accordion/vc-accordion.stories.ts +526 -0
- package/ui/components/molecules/vc-accordion/vc-accordion.vue +176 -0
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.stories.ts +1 -1
- package/ui/components/molecules/vc-checkbox/vc-checkbox.stories.ts +1 -1
- package/ui/components/molecules/vc-editor/vc-editor.stories.ts +1 -1
- package/ui/components/molecules/vc-field/vc-field.stories.ts +1 -1
- package/ui/components/molecules/vc-file-upload/vc-file-upload.stories.ts +1 -1
- package/ui/components/molecules/vc-form/vc-form.stories.ts +1 -1
- package/ui/components/molecules/vc-input/vc-input.stories.ts +1 -1
- package/ui/components/molecules/vc-input-currency/vc-input-currency.stories.ts +1 -1
- package/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.stories.ts +1 -1
- package/ui/components/molecules/vc-multivalue/vc-multivalue.stories.ts +1 -1
- package/ui/components/molecules/vc-pagination/vc-pagination.stories.ts +1 -1
- package/ui/components/molecules/vc-radio-button/vc-radio-button.stories.ts +1 -1
- package/ui/components/molecules/vc-rating/vc-rating.stories.ts +1 -1
- package/ui/components/molecules/vc-select/vc-select.stories.ts +1 -1
- package/ui/components/molecules/vc-slider/vc-slider.stories.ts +1 -1
- package/ui/components/molecules/vc-switch/vc-switch.stories.ts +1 -1
- package/ui/components/molecules/vc-textarea/vc-textarea.stories.ts +1 -1
- package/ui/components/molecules/vc-toast/vc-toast.stories.ts +1 -1
- package/ui/components/organisms/vc-app/vc-app.vue +2 -20
- package/ui/components/organisms/vc-dynamic-property/vc-dynamic-property.vue +4 -0
- package/ui/components/organisms/vc-gallery/vc-gallery.stories.ts +1 -1
- package/ui/components/organisms/vc-popup/vc-popup.stories.ts +1 -1
- package/core/providers/README.md +0 -176
- package/core/providers/auth-provider-manager.ts +0 -74
- package/core/providers/auth-provider-utils.ts +0 -26
- package/core/providers/example-custom-auth-provider.ts +0 -162
- package/core/providers/index.ts +0 -3
- package/core/providers/platform-auth-provider.ts +0 -207
- package/core/types/auth-provider.ts +0 -40
- package/dist/assets/042c75b764bc78a7.svg +0 -1
- package/dist/assets/0ba156439a339f2a.svg +0 -1
- package/dist/assets/0be560bfb22d0e72.woff2 +0 -0
- package/dist/assets/0f590f8a94577092.svg +0 -1
- package/dist/assets/0fc5820f8be53a1b.svg +0 -1
- package/dist/assets/105efd028edc1dfe.woff +0 -0
- package/dist/assets/10768e2cc79fc60b.svg +0 -1
- package/dist/assets/11b3d25a56fd9a21.woff2 +0 -0
- package/dist/assets/154365acf3010d96.woff2 +0 -0
- package/dist/assets/157b8721e0600ea8.svg +0 -1
- package/dist/assets/15e91cdd649cde9a.svg +0 -1
- package/dist/assets/19275e398ae57130.woff2 +0 -0
- package/dist/assets/1a3e84b2457f709a.woff +0 -0
- package/dist/assets/1de63eb118636cce.svg +0 -1
- package/dist/assets/1ea01de36eb5491b.svg +0 -1
- package/dist/assets/204eaf512fde2023.svg +0 -1
- package/dist/assets/2088983edf42e153.svg +0 -1
- package/dist/assets/208f810a9321a327.svg +0 -1
- package/dist/assets/21220a9d10e6c558.svg +0 -1
- package/dist/assets/220db345a102045d.woff2 +0 -0
- package/dist/assets/225da11d23968333.svg +0 -1
- package/dist/assets/226f862dd81bdc13.woff2 +0 -0
- package/dist/assets/23a2d53395ddb14f.woff +0 -0
- package/dist/assets/259e6ad461a52ad7.svg +0 -1
- package/dist/assets/261e6dec4d53b9ac.woff +0 -0
- package/dist/assets/262f46a0b6d94bb6.svg +0 -1
- package/dist/assets/2857c513073467da.svg +0 -1
- package/dist/assets/2b3be7889467d98f.woff +0 -0
- package/dist/assets/2d4e6190eec72737.svg +0 -1
- package/dist/assets/2eba973185078bc8.woff +0 -0
- package/dist/assets/334d3f6bc766c516.woff +0 -0
- package/dist/assets/34ff7dd0c2285956.svg +0 -1
- package/dist/assets/3d26b7c1ab78bbe2.woff +0 -0
- package/dist/assets/3d892965ab4f1cbb.woff2 +0 -0
- package/dist/assets/3f8c4cc8099e34b6.woff2 +0 -0
- package/dist/assets/40a0e53b79ce63c6.woff2 +0 -0
- package/dist/assets/41275bcb979cb650.svg +0 -1
- package/dist/assets/434f7982590e462f.woff +0 -0
- package/dist/assets/475937116ee3314a.woff2 +0 -0
- package/dist/assets/489710fb710e73f0.woff +0 -0
- package/dist/assets/49791943b3872376.woff2 +0 -0
- package/dist/assets/4ae5f23e0ca888e7.woff2 +0 -0
- package/dist/assets/4d7a77b0e5373992.svg +0 -1
- package/dist/assets/4e43c74354534fb3.svg +0 -1
- package/dist/assets/4fe75f5117100705.svg +0 -1
- package/dist/assets/52e261a005074e1b.woff +0 -0
- package/dist/assets/5304c3d05a5f9789.woff2 +0 -0
- package/dist/assets/54cda5482c6c9218.woff +0 -0
- package/dist/assets/550f52072e8ccafe.woff2 +0 -0
- package/dist/assets/572bb1bb4156a9c1.svg +0 -1
- package/dist/assets/6075995d7e74da46.woff2 +0 -0
- package/dist/assets/617c4736236e199e.woff +0 -0
- package/dist/assets/67230f05dc94a265.svg +0 -1
- package/dist/assets/6798e4dd4add9b48.svg +0 -1
- package/dist/assets/686d4077c1e26876.woff2 +0 -0
- package/dist/assets/698ec6c722d4cb05.woff2 +0 -0
- package/dist/assets/6a3e73faf406cf33.svg +0 -1
- package/dist/assets/72de3a63bc0b70dd.svg +0 -1
- package/dist/assets/74c6a6ab81bb6340.woff2 +0 -0
- package/dist/assets/74ed5f8a78e71106.svg +0 -1
- package/dist/assets/7a5aa5abd625137f.ttf +0 -0
- package/dist/assets/7ce0c166fd6a1204.woff +0 -0
- package/dist/assets/7d55399c2a7bc985.svg +0 -1
- package/dist/assets/7d970675c69fca1d.woff +0 -0
- package/dist/assets/7eda727273fd98d3.svg +0 -1
- package/dist/assets/7f6ebfd707b76ca2.woff +0 -0
- package/dist/assets/7fa898d213fcc7bc.woff2 +0 -0
- package/dist/assets/861e6b7192b3b6c7.woff +0 -0
- package/dist/assets/8bbcde81ba21ecb2.woff2 +0 -0
- package/dist/assets/8f6657e5e0b8d3e4.woff +0 -0
- package/dist/assets/910b0d99b9e26568.svg +0 -1
- package/dist/assets/91fe94e424323d61.woff +0 -0
- package/dist/assets/92508f8707159b51.svg +0 -1
- package/dist/assets/9392bf1d591e1abb.svg +0 -1
- package/dist/assets/97e8d4984ba0713a.woff2 +0 -0
- package/dist/assets/9cb83236f6bb7ab1.svg +0 -1
- package/dist/assets/9d37314695c0b68d.woff +0 -0
- package/dist/assets/a03cdcd8da5bb987.woff +0 -0
- package/dist/assets/a18404194e3f9047.svg +0 -1
- package/dist/assets/a2017fe7f0a26510.svg +0 -1
- package/dist/assets/ab6e7190bb1492d5.woff2 +0 -0
- package/dist/assets/abf88f301a0730f4.svg +0 -1
- package/dist/assets/ac1a99b3d05d8232.woff +0 -0
- package/dist/assets/aed17cb6fdad2ada.woff2 +0 -0
- package/dist/assets/b1a596e31ad1185a.svg +0 -1
- package/dist/assets/b27767411c8427be.woff +0 -0
- package/dist/assets/b325adcae33bbe7a.svg +0 -1
- package/dist/assets/b372390551ca2fa1.svg +0 -1
- package/dist/assets/b5bb1e8fc975decd.svg +0 -1
- package/dist/assets/b645a4a2181b9dc1.svg +0 -1
- package/dist/assets/b6499ddce0a4ef7d.svg +0 -1
- package/dist/assets/b94421fadd23b0f2.svg +0 -1
- package/dist/assets/bb28fb0f27f1c11b.svg +0 -1
- package/dist/assets/c9191b638a10f67b.woff2 +0 -0
- package/dist/assets/ca791c5ca5848a03.svg +0 -1
- package/dist/assets/cb32840ce330103f.woff +0 -0
- package/dist/assets/ccc878931d74181b.woff2 +0 -0
- package/dist/assets/d084bda16abe8a56.svg +0 -1
- package/dist/assets/d32b129cae2fffd6.svg +0 -1
- package/dist/assets/d35a4c7113315758.woff2 +0 -0
- package/dist/assets/d3f792f54ae4c307.svg +0 -1
- package/dist/assets/d5a5b8630120073d.svg +0 -1
- package/dist/assets/d5f9664ebbfb104b.svg +0 -1
- package/dist/assets/d84247b59449dd88.woff2 +0 -0
- package/dist/assets/dceaf3b39091e6a4.woff +0 -0
- package/dist/assets/dd05d43ff0df2fc7.svg +0 -1
- package/dist/assets/e2ad5b3428289141.woff +0 -0
- package/dist/assets/e38acaa1757232e0.svg +0 -1
- package/dist/assets/e4a8550f1c7ffe36.svg +0 -1
- package/dist/assets/e5adb5ae3a3698f6.svg +0 -1
- package/dist/assets/e61a1889bac955f4.woff2 +0 -0
- package/dist/assets/e72bb11356af94c7.svg +0 -1
- package/dist/assets/e98196a9f8dcb2f0.svg +0 -1
- package/dist/assets/ebec912a42ad49ff.woff +0 -0
- package/dist/assets/ee6983981ffcbb41.woff2 +0 -0
- package/dist/assets/f09d89268e4c0317.svg +0 -1
- package/dist/assets/f239394367fcf005.woff2 +0 -0
- package/dist/assets/f5722262b6e7214e.woff2 +0 -0
- package/dist/assets/f7fc8bf46089d8b2.svg +0 -1
- package/dist/assets/fc829e3f399b70e0.woff2 +0 -0
- package/dist/assets/fe141d99763f5d2b.woff +0 -0
- package/dist/assets/fed13b0d59903483.svg +0 -1
- package/dist/assets/fed757d2c2344ead.woff2 +0 -0
- package/dist/assets/ffc438f20e79ce73.woff +0 -0
- package/dist/core/providers/auth-provider-manager.d.ts +0 -34
- package/dist/core/providers/auth-provider-manager.d.ts.map +0 -1
- package/dist/core/providers/auth-provider-utils.d.ts +0 -17
- package/dist/core/providers/auth-provider-utils.d.ts.map +0 -1
- package/dist/core/providers/example-custom-auth-provider.d.ts +0 -45
- package/dist/core/providers/example-custom-auth-provider.d.ts.map +0 -1
- package/dist/core/providers/index.d.ts +0 -3
- package/dist/core/providers/index.d.ts.map +0 -1
- package/dist/core/providers/platform-auth-provider.d.ts +0 -34
- package/dist/core/providers/platform-auth-provider.d.ts.map +0 -1
- package/dist/core/types/auth-provider.d.ts +0 -27
- package/dist/core/types/auth-provider.d.ts.map +0 -1
- package/dist/framework.js +0 -25048
- package/dist/index.css +0 -9
- package/dist/vendor-boolbase-A_-Pp38P.js +0 -23
- package/dist/vendor-cheerio-C46iBpCu.js +0 -1053
- package/dist/vendor-cheerio-select-C8emRZsx.js +0 -191
- package/dist/vendor-core-js-DDuR6YMQ.js +0 -1206
- package/dist/vendor-css-select-DR9bp36p.js +0 -622
- package/dist/vendor-css-what-CZZaquJM.js +0 -267
- package/dist/vendor-cypress-signalr-mock-DjBxJHA6.js +0 -769
- package/dist/vendor-date-fns-sZ1zMzTH.js +0 -3008
- package/dist/vendor-dom-serializer-Sk3xHhQk.js +0 -213
- package/dist/vendor-domelementtype-B3sFIGaC.js +0 -21
- package/dist/vendor-domhandler-CL40eeX9.js +0 -311
- package/dist/vendor-dompurify-BuxjWxA2.js +0 -553
- package/dist/vendor-domutils-BiVCXO8c.js +0 -386
- package/dist/vendor-entities-CCReaWqU.js +0 -364
- package/dist/vendor-floating-ui-core-Cl9nBI4j.js +0 -349
- package/dist/vendor-floating-ui-dom-3z44E4mf.js +0 -395
- package/dist/vendor-floating-ui-utils-D2sT7feD.js +0 -259
- package/dist/vendor-floating-ui-vue-ClrgkeO5.js +0 -107
- package/dist/vendor-headlessui-vue-D7tzx4PC.js +0 -961
- package/dist/vendor-htmlparser2-CpQu33io.js +0 -735
- package/dist/vendor-intlify-core-base-Da62SG4M.js +0 -1130
- package/dist/vendor-intlify-message-compiler-CHvGSH2u.js +0 -952
- package/dist/vendor-intlify-shared-jWBPd9WB.js +0 -144
- package/dist/vendor-iso-639-1-BJO6WZAt.js +0 -781
- package/dist/vendor-linkify-it-LzoUhj6C.js +0 -199
- package/dist/vendor-linkifyjs-dCH9UYes.js +0 -701
- package/dist/vendor-lodash-es-BqkGj3Jl.js +0 -4816
- package/dist/vendor-lucide-vue-next-m0L4DzUL.js +0 -29780
- package/dist/vendor-markdown-it-Czg9qJTh.js +0 -2263
- package/dist/vendor-markdown-it-task-lists-BxLwscWK.js +0 -69
- package/dist/vendor-mdurl-DZFDNdqC.js +0 -192
- package/dist/vendor-microsoft-applicationinsights-analytics-js-C1Yxuzwg.js +0 -1207
- package/dist/vendor-microsoft-applicationinsights-cfgsync-js-DArHD4Dn.js +0 -261
- package/dist/vendor-microsoft-applicationinsights-channel-js-Dbs0XRes.js +0 -1822
- package/dist/vendor-microsoft-applicationinsights-common-OjU3Zs6r.js +0 -1921
- package/dist/vendor-microsoft-applicationinsights-core-js-DWRvqBek.js +0 -4276
- package/dist/vendor-microsoft-applicationinsights-dependencies-js-BxTNw-Sk.js +0 -1407
- package/dist/vendor-microsoft-applicationinsights-properties-js-Gfhpu-At.js +0 -572
- package/dist/vendor-microsoft-applicationinsights-shims-CxtPYiwp.js +0 -43
- package/dist/vendor-microsoft-applicationinsights-web-9yeJ0EZv.js +0 -487
- package/dist/vendor-microsoft-dynamicproto-js-DSkQkH3T.js +0 -147
- package/dist/vendor-microsoft-signalr-Bgpbb4fW.js +0 -1761
- package/dist/vendor-moment-DMLRxgRE.js +0 -2589
- package/dist/vendor-nevware21-ts-async-CdMc_sGt.js +0 -261
- package/dist/vendor-nevware21-ts-utils-Dy41wRhA.js +0 -853
- package/dist/vendor-nth-check-CS1D-zr5.js +0 -45
- package/dist/vendor-orderedmap-B3SOk52B.js +0 -103
- package/dist/vendor-parse5-htmlparser2-tree-adapter-BWywtwol.js +0 -143
- package/dist/vendor-parse5-zq5Hn0y9.js +0 -5749
- package/dist/vendor-prettier-cZc5sCiS.js +0 -4875
- package/dist/vendor-prosemirror-commands-Cu1q5ZDk.js +0 -385
- package/dist/vendor-prosemirror-dropcursor-BuGmFgFS.js +0 -86
- package/dist/vendor-prosemirror-gapcursor-CyYcCWVK.js +0 -203
- package/dist/vendor-prosemirror-history-DzRcbrCw.js +0 -248
- package/dist/vendor-prosemirror-keymap-KfbdOEJw.js +0 -62
- package/dist/vendor-prosemirror-markdown-OyxRuawK.js +0 -650
- package/dist/vendor-prosemirror-model-DFp4ML7B.js +0 -2730
- package/dist/vendor-prosemirror-schema-list-CwCUArvx.js +0 -87
- package/dist/vendor-prosemirror-state-DHaVEu5h.js +0 -821
- package/dist/vendor-prosemirror-tables-mYok4vGT.js +0 -1711
- package/dist/vendor-prosemirror-transform-CAHmg-qG.js +0 -1508
- package/dist/vendor-prosemirror-view-CspJa44O.js +0 -3751
- package/dist/vendor-punycode-js-CgGegfA_.js +0 -133
- package/dist/vendor-rope-sequence-BWC2FSrq.js +0 -100
- package/dist/vendor-semver-Dar8oU3V.js +0 -1023
- package/dist/vendor-swiper-1bp0oJwt.js +0 -3387
- package/dist/vendor-tanstack-virtual-core-l0sNRNKZ.js +0 -1
- package/dist/vendor-tanstack-vue-virtual-CD9yLWd7.js +0 -1
- package/dist/vendor-tiptap-core-ClsTgaMv.js +0 -3699
- package/dist/vendor-tiptap-extension-blockquote-r1MBx4hD.js +0 -54
- package/dist/vendor-tiptap-extension-bold-BjLI4i8b.js +0 -74
- package/dist/vendor-tiptap-extension-code-D5-kDnMW.js +0 -52
- package/dist/vendor-tiptap-extension-code-block-RjEb0zPA.js +0 -215
- package/dist/vendor-tiptap-extension-document--PLOxIdq.js +0 -12
- package/dist/vendor-tiptap-extension-hard-break-9cxC2YOS.js +0 -59
- package/dist/vendor-tiptap-extension-heading-2w0TutHn.js +0 -63
- package/dist/vendor-tiptap-extension-horizontal-rule-CFowa_lc.js +0 -56
- package/dist/vendor-tiptap-extension-image-aWn-na6j.js +0 -127
- package/dist/vendor-tiptap-extension-italic-Bn-6saY0.js +0 -73
- package/dist/vendor-tiptap-extension-link-BmcG1_k-.js +0 -298
- package/dist/vendor-tiptap-extension-list-BrNBJ45n.js +0 -707
- package/dist/vendor-tiptap-extension-paragraph-DAiYhwUB.js +0 -41
- package/dist/vendor-tiptap-extension-placeholder-9tURDKy-.js +0 -1
- package/dist/vendor-tiptap-extension-strike-DqbXPfos.js +0 -64
- package/dist/vendor-tiptap-extension-table-DQwPaR7v.js +0 -374
- package/dist/vendor-tiptap-extension-table-cell-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-table-header-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-table-row-C0tEP_0i.js +0 -1
- package/dist/vendor-tiptap-extension-text-BFnfj70b.js +0 -13
- package/dist/vendor-tiptap-extension-text-style-Darua3qr.js +0 -235
- package/dist/vendor-tiptap-extension-underline-QyVnBqQZ.js +0 -65
- package/dist/vendor-tiptap-extensions-CU-D7bfm.js +0 -290
- package/dist/vendor-tiptap-markdown-BwATYN5A.js +0 -826
- package/dist/vendor-tiptap-pm-d91nGny8.js +0 -1
- package/dist/vendor-tiptap-starter-kit-5luf7zzS.js +0 -28
- package/dist/vendor-tiptap-vue-3-CFBErZGb.js +0 -157
- package/dist/vendor-truncate-html-DYC0Lj9o.js +0 -145
- package/dist/vendor-uc-micro-4lbSaZOs.js +0 -17
- package/dist/vendor-vee-validate-i18n-zT8NxX3R.js +0 -93
- package/dist/vendor-vee-validate-rules-4oWUZPpG.js +0 -316
- package/dist/vendor-vue-currency-input-BqaYAdhD.js +0 -317
- package/dist/vendor-vue-demi-CD9yLWd7.js +0 -1
- package/dist/vendor-vue-devtools-api-aVYGocXp.js +0 -93
- package/dist/vendor-vue-i18n-CO5LWKE0.js +0 -1370
- package/dist/vendor-vue3-application-insights-BKiiWnf2.js +0 -69
- package/dist/vendor-vue3-touch-events-DqysuuWh.js +0 -169
- package/dist/vendor-vuepic-vue-datepicker-CaY_xSnG.js +0 -4998
- package/dist/vendor-vueuse-components-sgKpNzof.js +0 -542
- package/dist/vendor-vueuse-core-D0cN7FqY.js +0 -5130
- package/dist/vendor-vueuse-shared-Pt0UEStA.js +0 -1169
- package/dist/vendor-w3c-keyname-CLxH8j-f.js +0 -92
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
3
|
+
import { VcAccordion, VcAccordionItem } from ".";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "Molecules/VcAccordion",
|
|
7
|
+
component: VcAccordion,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
argTypes: {
|
|
10
|
+
items: {
|
|
11
|
+
description: "Array of accordion items to display",
|
|
12
|
+
control: "object",
|
|
13
|
+
table: {
|
|
14
|
+
type: { summary: "AccordionItem[]" },
|
|
15
|
+
defaultValue: { summary: "[]" },
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
modelValue: {
|
|
19
|
+
description: "Controls which items are expanded (single ID or array of IDs)",
|
|
20
|
+
control: "object",
|
|
21
|
+
table: {
|
|
22
|
+
type: { summary: "string | number | (string | number)[]" },
|
|
23
|
+
defaultValue: { summary: "undefined" },
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
multiple: {
|
|
27
|
+
description: "Allow multiple items to be expanded simultaneously",
|
|
28
|
+
control: "boolean",
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: "boolean" },
|
|
31
|
+
defaultValue: { summary: "false" },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
variant: {
|
|
35
|
+
description: "Visual style variant of the accordion",
|
|
36
|
+
control: "select",
|
|
37
|
+
options: ["default", "bordered", "separated"],
|
|
38
|
+
table: {
|
|
39
|
+
type: { summary: "'default' | 'bordered' | 'separated'" },
|
|
40
|
+
defaultValue: { summary: "'default'" },
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
collapsedHeight: {
|
|
44
|
+
description: "Default collapsed height for all items (in pixels)",
|
|
45
|
+
control: "number",
|
|
46
|
+
table: {
|
|
47
|
+
type: { summary: "number" },
|
|
48
|
+
defaultValue: { summary: "0" },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
maxExpandedHeight: {
|
|
52
|
+
description: "Maximum height when expanded (in pixels). Content will scroll if it exceeds this height.",
|
|
53
|
+
control: "number",
|
|
54
|
+
table: {
|
|
55
|
+
type: { summary: "number" },
|
|
56
|
+
defaultValue: { summary: "undefined" },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
args: {
|
|
61
|
+
multiple: false,
|
|
62
|
+
variant: "default",
|
|
63
|
+
collapsedHeight: 0,
|
|
64
|
+
},
|
|
65
|
+
parameters: {
|
|
66
|
+
docs: {
|
|
67
|
+
description: {
|
|
68
|
+
component: `
|
|
69
|
+
A flexible accordion component that supports collapsible content sections with smooth animations and customizable collapsed heights.
|
|
70
|
+
|
|
71
|
+
## Features
|
|
72
|
+
|
|
73
|
+
- **Customizable collapsed height** - Show partial content in collapsed state
|
|
74
|
+
- **Maximum expanded height** - Limit height with scroll for very long content
|
|
75
|
+
- **Smooth animations** - Fluid expand/collapse transitions
|
|
76
|
+
- **Smart overflow detection** - Automatically hides expand button when content fits
|
|
77
|
+
- **Gradient fade effect** - Fades out bottom of collapsed content
|
|
78
|
+
- **Multiple variants** - Default, bordered, and separated styles
|
|
79
|
+
- **Single/Multiple expansion** - Control whether multiple items can be open
|
|
80
|
+
- **Controlled/Uncontrolled** - Works with or without v-model
|
|
81
|
+
|
|
82
|
+
## Usage
|
|
83
|
+
|
|
84
|
+
\`\`\`vue
|
|
85
|
+
<template>
|
|
86
|
+
<VcAccordion :items="accordionItems" variant="bordered" />
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<script setup>
|
|
90
|
+
const accordionItems = [
|
|
91
|
+
{ id: 1, title: "Item 1", content: "Content here..." },
|
|
92
|
+
{ id: 2, title: "Item 2", content: "More content..." },
|
|
93
|
+
];
|
|
94
|
+
</script>
|
|
95
|
+
\`\`\`
|
|
96
|
+
`,
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
} satisfies Meta<typeof VcAccordion>;
|
|
101
|
+
|
|
102
|
+
export default meta;
|
|
103
|
+
type Story = StoryObj<typeof meta>;
|
|
104
|
+
|
|
105
|
+
const longText = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
106
|
+
|
|
107
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.`;
|
|
108
|
+
|
|
109
|
+
const veryLongText = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
110
|
+
|
|
111
|
+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
|
|
112
|
+
|
|
113
|
+
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio.
|
|
114
|
+
|
|
115
|
+
Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae.
|
|
116
|
+
|
|
117
|
+
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
118
|
+
|
|
119
|
+
Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?
|
|
120
|
+
|
|
121
|
+
Sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam.`;
|
|
122
|
+
|
|
123
|
+
const shortText = `This is a short content that fits within the default height.`;
|
|
124
|
+
|
|
125
|
+
const mediumText = `This is medium-length content that might be partially visible when collapsed. It contains a few sentences to demonstrate the fade effect when the content exceeds the collapsed height threshold.`;
|
|
126
|
+
|
|
127
|
+
export const Default: Story = {
|
|
128
|
+
render: (args) => ({
|
|
129
|
+
components: { VcAccordion },
|
|
130
|
+
setup() {
|
|
131
|
+
const items = [
|
|
132
|
+
{ id: "item1", title: "What is VirtoCommerce?", content: longText },
|
|
133
|
+
{ id: "item2", title: "How to get started?", content: mediumText },
|
|
134
|
+
{ id: "item3", title: "Pricing information", content: longText },
|
|
135
|
+
];
|
|
136
|
+
return { args, items };
|
|
137
|
+
},
|
|
138
|
+
template: `
|
|
139
|
+
<VcAccordion v-bind="args" :items="items" />
|
|
140
|
+
`,
|
|
141
|
+
}),
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const WithCollapsedHeight: Story = {
|
|
145
|
+
render: (args) => ({
|
|
146
|
+
components: { VcAccordion },
|
|
147
|
+
setup() {
|
|
148
|
+
const items = [
|
|
149
|
+
{ id: "item1", title: "Partially visible content", content: longText },
|
|
150
|
+
{ id: "item2", title: "Another section", content: mediumText },
|
|
151
|
+
{ id: "item3", title: "More information", content: longText },
|
|
152
|
+
];
|
|
153
|
+
return { args, items };
|
|
154
|
+
},
|
|
155
|
+
template: `
|
|
156
|
+
<VcAccordion v-bind="args" :items="items" :collapsed-height="100" />
|
|
157
|
+
`,
|
|
158
|
+
}),
|
|
159
|
+
parameters: {
|
|
160
|
+
docs: {
|
|
161
|
+
description: {
|
|
162
|
+
story: "Accordion with 100px collapsed height showing partial content with fade effect.",
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export const MultipleOpen: Story = {
|
|
169
|
+
render: (args) => ({
|
|
170
|
+
components: { VcAccordion },
|
|
171
|
+
setup() {
|
|
172
|
+
const items = [
|
|
173
|
+
{ id: "item1", title: "Features", content: longText },
|
|
174
|
+
{ id: "item2", title: "Documentation", content: mediumText },
|
|
175
|
+
{ id: "item3", title: "Support", content: longText },
|
|
176
|
+
];
|
|
177
|
+
const openItems = ref(["item1", "item3"]);
|
|
178
|
+
return { args, items, openItems };
|
|
179
|
+
},
|
|
180
|
+
template: `
|
|
181
|
+
<VcAccordion
|
|
182
|
+
v-bind="args"
|
|
183
|
+
:items="items"
|
|
184
|
+
:multiple="true"
|
|
185
|
+
v-model="openItems"
|
|
186
|
+
/>
|
|
187
|
+
<div class="tw-mt-4 tw-p-4 tw-bg-gray-100 tw-rounded">
|
|
188
|
+
<strong>Open items:</strong> {{ openItems }}
|
|
189
|
+
</div>
|
|
190
|
+
`,
|
|
191
|
+
}),
|
|
192
|
+
parameters: {
|
|
193
|
+
docs: {
|
|
194
|
+
description: {
|
|
195
|
+
story: "Multiple items can be expanded at the same time with `multiple` prop.",
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export const BorderedVariant: Story = {
|
|
202
|
+
render: (args) => ({
|
|
203
|
+
components: { VcAccordion },
|
|
204
|
+
setup() {
|
|
205
|
+
const items = [
|
|
206
|
+
{ id: "item1", title: "Section 1", content: mediumText },
|
|
207
|
+
{ id: "item2", title: "Section 2", content: longText },
|
|
208
|
+
{ id: "item3", title: "Section 3", content: mediumText },
|
|
209
|
+
];
|
|
210
|
+
return { args, items };
|
|
211
|
+
},
|
|
212
|
+
template: `
|
|
213
|
+
<VcAccordion v-bind="args" :items="items" variant="bordered" />
|
|
214
|
+
`,
|
|
215
|
+
}),
|
|
216
|
+
parameters: {
|
|
217
|
+
docs: {
|
|
218
|
+
description: {
|
|
219
|
+
story: "Bordered variant with outer border and no rounded corners on individual items.",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
export const SeparatedVariant: Story = {
|
|
226
|
+
render: (args) => ({
|
|
227
|
+
components: { VcAccordion },
|
|
228
|
+
setup() {
|
|
229
|
+
const items = [
|
|
230
|
+
{ id: "item1", title: "Card-style item 1", content: mediumText },
|
|
231
|
+
{ id: "item2", title: "Card-style item 2", content: longText },
|
|
232
|
+
{ id: "item3", title: "Card-style item 3", content: mediumText },
|
|
233
|
+
];
|
|
234
|
+
return { args, items };
|
|
235
|
+
},
|
|
236
|
+
template: `
|
|
237
|
+
<VcAccordion v-bind="args" :items="items" variant="separated" />
|
|
238
|
+
`,
|
|
239
|
+
}),
|
|
240
|
+
parameters: {
|
|
241
|
+
docs: {
|
|
242
|
+
description: {
|
|
243
|
+
story: "Separated variant with gaps between items for a card-like appearance.",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export const MixedContentLengths: Story = {
|
|
250
|
+
render: (args) => ({
|
|
251
|
+
components: { VcAccordion },
|
|
252
|
+
setup() {
|
|
253
|
+
const items = [
|
|
254
|
+
{
|
|
255
|
+
id: "short",
|
|
256
|
+
title: "Short content (no expand button)",
|
|
257
|
+
content: shortText,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
id: "medium",
|
|
261
|
+
title: "Medium content (with fade)",
|
|
262
|
+
content: mediumText,
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: "long",
|
|
266
|
+
title: "Long content (fully expandable)",
|
|
267
|
+
content: longText,
|
|
268
|
+
},
|
|
269
|
+
];
|
|
270
|
+
return { args, items };
|
|
271
|
+
},
|
|
272
|
+
template: `
|
|
273
|
+
<VcAccordion v-bind="args" :items="items" :collapsed-height="80" />
|
|
274
|
+
`,
|
|
275
|
+
}),
|
|
276
|
+
parameters: {
|
|
277
|
+
docs: {
|
|
278
|
+
description: {
|
|
279
|
+
story:
|
|
280
|
+
"Demonstrates smart overflow detection - short content shows no expand button, while longer content gets the fade effect and expand functionality.",
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
export const WithCustomTitles: Story = {
|
|
287
|
+
render: (args) => ({
|
|
288
|
+
components: { VcAccordion, VcAccordionItem },
|
|
289
|
+
setup() {
|
|
290
|
+
return { args, longText };
|
|
291
|
+
},
|
|
292
|
+
template: `
|
|
293
|
+
<VcAccordion v-bind="args">
|
|
294
|
+
<VcAccordionItem>
|
|
295
|
+
<template #title>
|
|
296
|
+
<div class="tw-flex tw-items-center tw-gap-2">
|
|
297
|
+
<span class="tw-px-2 tw-py-1 tw-bg-blue-500 tw-text-white tw-rounded tw-text-xs">NEW</span>
|
|
298
|
+
<span>Custom title with badge</span>
|
|
299
|
+
</div>
|
|
300
|
+
</template>
|
|
301
|
+
{{ longText }}
|
|
302
|
+
</VcAccordionItem>
|
|
303
|
+
|
|
304
|
+
<VcAccordionItem>
|
|
305
|
+
<template #title>
|
|
306
|
+
<div class="tw-flex tw-items-center tw-gap-2">
|
|
307
|
+
<span class="tw-text-red-500">⚠️</span>
|
|
308
|
+
<span>Important notice</span>
|
|
309
|
+
</div>
|
|
310
|
+
</template>
|
|
311
|
+
{{ mediumText }}
|
|
312
|
+
</VcAccordionItem>
|
|
313
|
+
|
|
314
|
+
<VcAccordionItem title="Regular title">
|
|
315
|
+
{{ shortText }}
|
|
316
|
+
</VcAccordionItem>
|
|
317
|
+
</VcAccordion>
|
|
318
|
+
`,
|
|
319
|
+
}),
|
|
320
|
+
parameters: {
|
|
321
|
+
docs: {
|
|
322
|
+
description: {
|
|
323
|
+
story: "Use the default slot to compose accordion items with custom title slots.",
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
},
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export const DisabledItems: Story = {
|
|
330
|
+
render: (args) => ({
|
|
331
|
+
components: { VcAccordion },
|
|
332
|
+
setup() {
|
|
333
|
+
const items = [
|
|
334
|
+
{ id: "item1", title: "Active item", content: longText, disabled: false },
|
|
335
|
+
{
|
|
336
|
+
id: "item2",
|
|
337
|
+
title: "Disabled item",
|
|
338
|
+
content: mediumText,
|
|
339
|
+
disabled: true,
|
|
340
|
+
},
|
|
341
|
+
{ id: "item3", title: "Another active item", content: longText, disabled: false },
|
|
342
|
+
];
|
|
343
|
+
return { args, items };
|
|
344
|
+
},
|
|
345
|
+
template: `
|
|
346
|
+
<VcAccordion v-bind="args" :items="items" />
|
|
347
|
+
`,
|
|
348
|
+
}),
|
|
349
|
+
parameters: {
|
|
350
|
+
docs: {
|
|
351
|
+
description: {
|
|
352
|
+
story: "Individual items can be disabled using the `disabled` property.",
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
export const ControlledAccordion: Story = {
|
|
359
|
+
render: (args) => ({
|
|
360
|
+
components: { VcAccordion },
|
|
361
|
+
setup() {
|
|
362
|
+
const items = [
|
|
363
|
+
{ id: "faq1", title: "How to install?", content: mediumText },
|
|
364
|
+
{ id: "faq2", title: "How to configure?", content: longText },
|
|
365
|
+
{ id: "faq3", title: "How to deploy?", content: mediumText },
|
|
366
|
+
];
|
|
367
|
+
const currentOpen = ref<string | null>("faq1");
|
|
368
|
+
|
|
369
|
+
const openNext = () => {
|
|
370
|
+
const ids = ["faq1", "faq2", "faq3"];
|
|
371
|
+
const currentIndex = currentOpen.value ? ids.indexOf(currentOpen.value) : -1;
|
|
372
|
+
const nextIndex = (currentIndex + 1) % ids.length;
|
|
373
|
+
currentOpen.value = ids[nextIndex];
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
return { args, items, currentOpen, openNext };
|
|
377
|
+
},
|
|
378
|
+
template: `
|
|
379
|
+
<div>
|
|
380
|
+
<button
|
|
381
|
+
@click="openNext"
|
|
382
|
+
class="tw-mb-4 tw-px-4 tw-py-2 tw-bg-blue-500 tw-text-white tw-rounded hover:tw-bg-blue-600"
|
|
383
|
+
>
|
|
384
|
+
Open Next Item
|
|
385
|
+
</button>
|
|
386
|
+
|
|
387
|
+
<VcAccordion
|
|
388
|
+
v-bind="args"
|
|
389
|
+
:items="items"
|
|
390
|
+
v-model="currentOpen"
|
|
391
|
+
/>
|
|
392
|
+
|
|
393
|
+
<div class="tw-mt-4 tw-p-4 tw-bg-gray-100 tw-rounded">
|
|
394
|
+
<strong>Currently open:</strong> {{ currentOpen }}
|
|
395
|
+
</div>
|
|
396
|
+
</div>
|
|
397
|
+
`,
|
|
398
|
+
}),
|
|
399
|
+
parameters: {
|
|
400
|
+
docs: {
|
|
401
|
+
description: {
|
|
402
|
+
story: "Accordion state can be controlled externally using v-model.",
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
export const IndividualCollapsedHeights: Story = {
|
|
409
|
+
render: (args) => ({
|
|
410
|
+
components: { VcAccordion },
|
|
411
|
+
setup() {
|
|
412
|
+
const items = [
|
|
413
|
+
{
|
|
414
|
+
id: "item1",
|
|
415
|
+
title: "Fully collapsed (0px)",
|
|
416
|
+
content: longText,
|
|
417
|
+
collapsedHeight: 0,
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
id: "item2",
|
|
421
|
+
title: "Partially visible (60px)",
|
|
422
|
+
content: longText,
|
|
423
|
+
collapsedHeight: 60,
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
id: "item3",
|
|
427
|
+
title: "More visible (120px)",
|
|
428
|
+
content: longText,
|
|
429
|
+
collapsedHeight: 120,
|
|
430
|
+
},
|
|
431
|
+
];
|
|
432
|
+
return { args, items };
|
|
433
|
+
},
|
|
434
|
+
template: `
|
|
435
|
+
<VcAccordion v-bind="args" :items="items" variant="separated" />
|
|
436
|
+
`,
|
|
437
|
+
}),
|
|
438
|
+
parameters: {
|
|
439
|
+
docs: {
|
|
440
|
+
description: {
|
|
441
|
+
story: "Each accordion item can have its own `collapsedHeight` value.",
|
|
442
|
+
},
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export const WithMaxExpandedHeight: Story = {
|
|
448
|
+
render: (args) => ({
|
|
449
|
+
components: { VcAccordion },
|
|
450
|
+
setup() {
|
|
451
|
+
const items = [
|
|
452
|
+
{
|
|
453
|
+
id: "item1",
|
|
454
|
+
title: "Very long content with scroll (max 300px)",
|
|
455
|
+
content: veryLongText,
|
|
456
|
+
maxExpandedHeight: 300,
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
id: "item2",
|
|
460
|
+
title: "Very long content with scroll (max 200px)",
|
|
461
|
+
content: veryLongText,
|
|
462
|
+
maxExpandedHeight: 200,
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
id: "item3",
|
|
466
|
+
title: "Long content without limit",
|
|
467
|
+
content: longText,
|
|
468
|
+
},
|
|
469
|
+
];
|
|
470
|
+
return { args, items, veryLongText };
|
|
471
|
+
},
|
|
472
|
+
template: `
|
|
473
|
+
<VcAccordion v-bind="args" :items="items" variant="separated" />
|
|
474
|
+
`,
|
|
475
|
+
}),
|
|
476
|
+
parameters: {
|
|
477
|
+
docs: {
|
|
478
|
+
description: {
|
|
479
|
+
story:
|
|
480
|
+
"When content is very long and `maxExpandedHeight` is set, the expanded content becomes scrollable. This prevents extremely long content from taking up too much screen space.",
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
export const WithPartialVisibilityAndScroll: Story = {
|
|
487
|
+
render: (args) => ({
|
|
488
|
+
components: { VcAccordion },
|
|
489
|
+
setup() {
|
|
490
|
+
const items = [
|
|
491
|
+
{
|
|
492
|
+
id: "item1",
|
|
493
|
+
title: "Collapsed: 80px, Expanded max: 400px (with scroll)",
|
|
494
|
+
content: veryLongText,
|
|
495
|
+
collapsedHeight: 80,
|
|
496
|
+
maxExpandedHeight: 400,
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
id: "item2",
|
|
500
|
+
title: "Collapsed: 100px, Expanded max: 250px (with scroll)",
|
|
501
|
+
content: veryLongText,
|
|
502
|
+
collapsedHeight: 100,
|
|
503
|
+
maxExpandedHeight: 250,
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
id: "item3",
|
|
507
|
+
title: "Collapsed: 60px, No max height (full expansion)",
|
|
508
|
+
content: veryLongText,
|
|
509
|
+
collapsedHeight: 60,
|
|
510
|
+
},
|
|
511
|
+
];
|
|
512
|
+
return { args, items, veryLongText };
|
|
513
|
+
},
|
|
514
|
+
template: `
|
|
515
|
+
<VcAccordion v-bind="args" :items="items" variant="bordered" />
|
|
516
|
+
`,
|
|
517
|
+
}),
|
|
518
|
+
parameters: {
|
|
519
|
+
docs: {
|
|
520
|
+
description: {
|
|
521
|
+
story:
|
|
522
|
+
"Demonstrates combining `collapsedHeight` (partial visibility with fade effect) and `maxExpandedHeight` (scroll in expanded state). Collapsed state never shows scroll for aesthetic reasons.",
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
},
|
|
526
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vc-accordion" :class="`vc-accordion--${variant}`">
|
|
3
|
+
<VcAccordionItem
|
|
4
|
+
v-for="(item, index) in items"
|
|
5
|
+
:key="item.id || index"
|
|
6
|
+
:title="item.title"
|
|
7
|
+
:collapsed-height="item.collapsedHeight ?? collapsedHeight"
|
|
8
|
+
:max-expanded-height="item.maxExpandedHeight ?? maxExpandedHeight"
|
|
9
|
+
:is-expanded="isItemExpanded(item.id || index)"
|
|
10
|
+
:disabled="item.disabled"
|
|
11
|
+
class="vc-accordion__item"
|
|
12
|
+
@toggle="(expanded) => handleToggle(item.id || index, expanded)"
|
|
13
|
+
>
|
|
14
|
+
<template v-if="item.titleSlot" #title>
|
|
15
|
+
<component :is="item.titleSlot" />
|
|
16
|
+
</template>
|
|
17
|
+
<template v-if="typeof item.content === 'string'">
|
|
18
|
+
{{ item.content }}
|
|
19
|
+
</template>
|
|
20
|
+
<component v-else-if="item.content" :is="item.content" />
|
|
21
|
+
</VcAccordionItem>
|
|
22
|
+
|
|
23
|
+
<slot></slot>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script lang="ts" setup>
|
|
28
|
+
import { ref, watch, computed } from "vue";
|
|
29
|
+
import VcAccordionItem from "./_internal/vc-accordion-item/vc-accordion-item.vue";
|
|
30
|
+
import type { Component } from "vue";
|
|
31
|
+
|
|
32
|
+
export interface AccordionItem {
|
|
33
|
+
id?: string | number;
|
|
34
|
+
title: string;
|
|
35
|
+
content?: string | Component;
|
|
36
|
+
titleSlot?: Component;
|
|
37
|
+
collapsedHeight?: number;
|
|
38
|
+
maxExpandedHeight?: number;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface Props {
|
|
43
|
+
items?: AccordionItem[];
|
|
44
|
+
modelValue?: (string | number) | (string | number)[];
|
|
45
|
+
multiple?: boolean;
|
|
46
|
+
variant?: "default" | "bordered" | "separated";
|
|
47
|
+
collapsedHeight?: number;
|
|
48
|
+
maxExpandedHeight?: number;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface Emits {
|
|
52
|
+
(event: "update:modelValue", value: (string | number) | (string | number)[]): void;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
56
|
+
items: () => [],
|
|
57
|
+
multiple: false,
|
|
58
|
+
variant: "default",
|
|
59
|
+
collapsedHeight: 0,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const emit = defineEmits<Emits>();
|
|
63
|
+
|
|
64
|
+
defineOptions({
|
|
65
|
+
name: "VcAccordion",
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
defineSlots<{
|
|
69
|
+
default: (props?: any) => any;
|
|
70
|
+
}>();
|
|
71
|
+
|
|
72
|
+
const expandedItems = ref<(string | number)[]>([]);
|
|
73
|
+
|
|
74
|
+
const isItemExpanded = computed(() => {
|
|
75
|
+
return (id: string | number) => expandedItems.value.includes(id);
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
function handleToggle(id: string | number, expanded: boolean) {
|
|
79
|
+
if (expanded) {
|
|
80
|
+
if (props.multiple) {
|
|
81
|
+
expandedItems.value.push(id);
|
|
82
|
+
} else {
|
|
83
|
+
expandedItems.value = [id];
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
expandedItems.value = expandedItems.value.filter((itemId) => itemId !== id);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
emitModelValue();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function emitModelValue() {
|
|
93
|
+
if (props.multiple) {
|
|
94
|
+
emit("update:modelValue", expandedItems.value);
|
|
95
|
+
} else {
|
|
96
|
+
emit("update:modelValue", expandedItems.value[0] ?? null);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function initializeExpandedItems() {
|
|
101
|
+
if (props.modelValue !== undefined && props.modelValue !== null) {
|
|
102
|
+
if (Array.isArray(props.modelValue)) {
|
|
103
|
+
expandedItems.value = [...props.modelValue];
|
|
104
|
+
} else {
|
|
105
|
+
expandedItems.value = [props.modelValue];
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
expandedItems.value = [];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
watch(
|
|
113
|
+
() => props.modelValue,
|
|
114
|
+
() => {
|
|
115
|
+
initializeExpandedItems();
|
|
116
|
+
},
|
|
117
|
+
{ immediate: true },
|
|
118
|
+
);
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<style lang="scss">
|
|
122
|
+
.vc-accordion {
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
|
|
126
|
+
&--default {
|
|
127
|
+
gap: 0;
|
|
128
|
+
|
|
129
|
+
.vc-accordion__item {
|
|
130
|
+
border-bottom: 1px solid var(--accordion-item-border-color);
|
|
131
|
+
|
|
132
|
+
&:first-child {
|
|
133
|
+
border-top: 1px solid var(--accordion-item-border-color);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:not(:first-child) {
|
|
137
|
+
.vc-accordion-item {
|
|
138
|
+
border-top-left-radius: 0;
|
|
139
|
+
border-top-right-radius: 0;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&:not(:last-child) {
|
|
144
|
+
.vc-accordion-item {
|
|
145
|
+
border-bottom-left-radius: 0;
|
|
146
|
+
border-bottom-right-radius: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&--bordered {
|
|
153
|
+
border: 1px solid var(--accordion-item-border-color);
|
|
154
|
+
border-radius: var(--accordion-item-border-radius);
|
|
155
|
+
overflow: hidden;
|
|
156
|
+
|
|
157
|
+
.vc-accordion__item {
|
|
158
|
+
&:not(:last-child) {
|
|
159
|
+
border-bottom: 1px solid var(--accordion-item-border-color);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.vc-accordion-item {
|
|
163
|
+
border-radius: 0;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&--separated {
|
|
169
|
+
gap: 12px;
|
|
170
|
+
|
|
171
|
+
.vc-accordion__item {
|
|
172
|
+
border: 1px solid var(--accordion-item-border-color);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/vue3";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/vue3-vite";
|
|
2
2
|
import { VcBreadcrumbs } from "./";
|
|
3
3
|
import { ref, watch, onMounted } from "vue";
|
|
4
4
|
// Import for example only - not needed in projects where useBreadcrumbs is already injected
|