@onereach/ui-components 2.72.2-beta.2272.0 → 2.72.2-beta.2274.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/dist/bundled/v2/{OrButton-4862b98b.js → OrButton-d45772c1.js} +3 -3
- package/dist/bundled/v2/{OrCardCollection-55fd8cf6.js → OrCardCollection-4ac89ea5.js} +4 -4
- package/dist/bundled/v2/{OrConfirm-10e4fe6a.js → OrConfirm-8c0e957d.js} +2 -2
- package/dist/bundled/v2/{OrEmptyState-8a7feb99.js → OrEmptyState-9fb413f9.js} +2 -2
- package/dist/bundled/v2/{OrErrorTag-175a2c4f.js → OrErrorTag-97a9112b.js} +2 -0
- package/dist/bundled/v2/{OrIconButton-088ac8ec.js → OrIconButton-837d57f8.js} +1 -1
- package/dist/bundled/v2/{OrInlineInput-f2bd6b5c.js → OrInlineInput-57fccb41.js} +1 -1
- package/dist/bundled/v2/{OrInlineTextarea-813d4193.js → OrInlineTextarea-f8b86cf7.js} +1 -1
- package/dist/bundled/v2/{OrInput-9253f834.js → OrInput-00070eee.js} +1 -1
- package/dist/bundled/v2/{OrMenu-6ab53877.js → OrMenu-52da43bc.js} +15 -10
- package/dist/bundled/v2/{OrModal-d08fb037.js → OrModal-78f5d49e.js} +1 -1
- package/dist/bundled/v2/{OrNotification-bd008b65.js → OrNotification-458fe937.js} +1 -1
- package/dist/bundled/v2/{OrPagination-9bf3d797.js → OrPagination-daf25de2.js} +24 -60
- package/dist/bundled/v2/{OrProgress-5cf0a7e7.js → OrProgress-15fe65ec.js} +3 -3
- package/dist/bundled/v2/{OrSearch-a975639b.js → OrSearch-09fd004c.js} +1 -1
- package/dist/bundled/v2/{OrSelect-d3b5780a.js → OrSelect-2ececfc1.js} +2 -2
- package/dist/bundled/v2/{OrSidebar-b1442193.js → OrSidebar-a2bc21b9.js} +158 -37
- package/dist/bundled/v2/OrSidebarCollapseButton-8297ef86.js +125 -0
- package/dist/bundled/v2/{OrTabs-517e2f25.js → OrTabs-d69780fc.js} +1 -1
- package/dist/bundled/v2/{OrTag-2903c38e.js → OrTag-4085e8a7.js} +3 -1
- package/dist/bundled/v2/{OrTooltip-0c73d25d.js → OrTooltip-b1f38647.js} +1 -1
- package/dist/bundled/v2/components/index.js +22 -21
- package/dist/bundled/v2/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-card-collection-v3/index.js +7 -7
- package/dist/bundled/v2/components/or-confirm-v3/index.js +5 -5
- package/dist/bundled/v2/components/or-empty-state-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-error-tag-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-icon-button-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-inline-input-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-inline-textarea-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-input-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/bundled/v2/components/or-menu-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-menu-v3/styles.d.ts +1 -0
- package/dist/bundled/v2/components/or-modal-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-notification-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -4
- package/dist/bundled/v2/components/or-pagination-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-progress-v3/index.js +1 -1
- package/dist/bundled/v2/components/or-progress-v3/styles.d.ts +1 -1
- package/dist/bundled/v2/components/or-search-v3/index.js +4 -4
- package/dist/bundled/v2/components/or-select-v3/index.js +5 -5
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/bundled/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/bundled/v2/components/or-sidebar-v3/index.js +13 -1
- package/dist/bundled/v2/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/index.js +18 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.d.ts +1 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +18 -0
- package/dist/bundled/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/styles.d.ts +2 -0
- package/dist/bundled/v2/components/or-sidebar-v3/styles.d.ts +7 -1
- package/dist/bundled/v2/components/or-tabs-v3/index.js +2 -2
- package/dist/bundled/v2/components/or-tag-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-toast-v3/index.js +3 -3
- package/dist/bundled/v2/components/or-tooltip-v3/index.js +1 -1
- package/dist/bundled/v2/index.js +23 -22
- package/dist/bundled/v2/{types-d6c9284d.js → types-309b7b94.js} +1 -1
- package/dist/bundled/v3/{OrButton-05766523.js → OrButton-a1448bfa.js} +1 -1
- package/dist/bundled/v3/{OrButton.vue_vue_type_script_lang-b53e78f5.js → OrButton.vue_vue_type_script_lang-3b1e442b.js} +3 -3
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-40a5aa15.js → OrCardCollection.vue_vue_type_script_lang-f76c3264.js} +7 -7
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-53503801.js → OrConfirm.vue_vue_type_script_lang-eb2bfce2.js} +4 -4
- package/dist/bundled/v3/{OrEmptyState.vue_vue_type_script_lang-8e58c67c.js → OrEmptyState.vue_vue_type_script_lang-da7d6c42.js} +2 -2
- package/dist/bundled/v3/{OrErrorTag.vue_vue_type_script_lang-fa28d642.js → OrErrorTag.vue_vue_type_script_lang-e2fe7ca9.js} +2 -0
- package/dist/bundled/v3/{OrIconButton-72d4d349.js → OrIconButton-e0566ecf.js} +1 -1
- package/dist/bundled/v3/{OrIconButton.vue_vue_type_script_lang-28452eda.js → OrIconButton.vue_vue_type_script_lang-7d1c3fe1.js} +1 -1
- package/dist/bundled/v3/{OrInlineInput.vue_vue_type_script_lang-96aef83e.js → OrInlineInput.vue_vue_type_script_lang-49ce3308.js} +2 -2
- package/dist/bundled/v3/{OrInlineTextarea.vue_vue_type_script_lang-8be03a08.js → OrInlineTextarea.vue_vue_type_script_lang-8fd761d7.js} +2 -2
- package/dist/bundled/v3/{OrInput-6f6c700a.js → OrInput-dcf2606e.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-115050fc.js → OrInput.vue_vue_type_script_lang-27220623.js} +2 -2
- package/dist/bundled/v3/{OrMenu-bb432db5.js → OrMenu-6d7abe97.js} +10 -9
- package/dist/bundled/v3/{OrMenu.vue_vue_type_script_lang-5a492eb3.js → OrMenu.vue_vue_type_script_lang-df35fd76.js} +8 -5
- package/dist/bundled/v3/{OrModal.vue_vue_type_script_lang-230bc99d.js → OrModal.vue_vue_type_script_lang-6b1dc231.js} +2 -2
- package/dist/bundled/v3/{OrNotification.vue_vue_type_script_lang-d9b2b5bf.js → OrNotification.vue_vue_type_script_lang-d0afc1d7.js} +2 -2
- package/dist/bundled/v3/{OrPagination.vue_vue_type_script_lang-bdb0acc8.js → OrPagination.vue_vue_type_script_lang-f64827ef.js} +20 -35
- package/dist/bundled/v3/{OrProgress.vue_vue_type_script_lang-17095060.js → OrProgress.vue_vue_type_script_lang-52f660d6.js} +3 -3
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-5c683c38.js → OrSearch.vue_vue_type_script_lang-c054c8db.js} +2 -2
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-84902694.js → OrSelect.vue_vue_type_script_lang-7fd5e2f0.js} +3 -3
- package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-7f3f1a16.js +291 -0
- package/dist/bundled/v3/OrSidebarCollapseButton.vue_vue_type_script_lang-9aeba2d4.js +75 -0
- package/dist/bundled/v3/{OrTabs.vue_vue_type_script_lang-ae519161.js → OrTabs.vue_vue_type_script_lang-cb550e87.js} +2 -2
- package/dist/bundled/v3/{OrTag.vue_vue_type_script_lang-33767daa.js → OrTag.vue_vue_type_script_lang-a25a49ee.js} +4 -2
- package/dist/bundled/v3/{OrToastContainer-2247bc2a.js → OrToastContainer-6fe12712.js} +1 -1
- package/dist/bundled/v3/{OrTooltip.vue_vue_type_script_lang-250ecf1d.js → OrTooltip.vue_vue_type_script_lang-bf9935ef.js} +1 -1
- package/dist/bundled/v3/components/index.js +26 -25
- package/dist/bundled/v3/components/or-button-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-card-collection-v3/index.js +11 -11
- package/dist/bundled/v3/components/or-confirm-v3/index.js +8 -8
- package/dist/bundled/v3/components/or-empty-state-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-error-tag-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-icon-button-v3/index.js +2 -2
- package/dist/bundled/v3/components/or-inline-input-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-inline-textarea-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-input-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/bundled/v3/components/or-menu-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-menu-v3/styles.d.ts +1 -0
- package/dist/bundled/v3/components/or-modal-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-notification-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -4
- package/dist/bundled/v3/components/or-pagination-v3/index.js +5 -5
- package/dist/bundled/v3/components/or-progress-v3/index.js +1 -1
- package/dist/bundled/v3/components/or-progress-v3/styles.d.ts +1 -1
- package/dist/bundled/v3/components/or-search-v3/index.js +6 -6
- package/dist/bundled/v3/components/or-select-v3/index.js +7 -7
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/bundled/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/bundled/v3/components/or-sidebar-v3/index.js +16 -2
- package/dist/bundled/v3/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/index.js +17 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.d.ts +1 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +17 -0
- package/dist/bundled/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/styles.d.ts +2 -0
- package/dist/bundled/v3/components/or-sidebar-v3/styles.d.ts +7 -1
- package/dist/bundled/v3/components/or-tabs-v3/index.js +3 -3
- package/dist/bundled/v3/components/or-tag-v3/index.js +4 -4
- package/dist/bundled/v3/components/or-toast-v3/index.js +5 -5
- package/dist/bundled/v3/components/or-tooltip-v3/index.js +1 -1
- package/dist/bundled/v3/index.js +70 -75
- package/dist/bundled/v3/{types-e10af3b0.js → types-22fbf9d6.js} +2 -2
- package/dist/esm/v2/{OrButton-18f4431c.js → OrButton-66964360.js} +3 -3
- package/dist/esm/v2/{OrCardCollection-322733bc.js → OrCardCollection-5a9eda35.js} +4 -4
- package/dist/esm/v2/{OrConfirm-61edc9a5.js → OrConfirm-9dbdedd7.js} +2 -2
- package/dist/esm/v2/{OrEmptyState-ab1a044d.js → OrEmptyState-2481f13f.js} +2 -2
- package/dist/esm/v2/{OrErrorTag-5346825b.js → OrErrorTag-80f82cdf.js} +2 -0
- package/dist/esm/v2/{OrIconButton-a648b35b.js → OrIconButton-04a3566d.js} +1 -1
- package/dist/esm/v2/{OrInlineInput-32c724b2.js → OrInlineInput-b85b84b4.js} +1 -1
- package/dist/esm/v2/{OrInlineTextarea-a7d1b655.js → OrInlineTextarea-afd33047.js} +1 -1
- package/dist/esm/v2/{OrInput-1510deaa.js → OrInput-59a15d80.js} +1 -1
- package/dist/esm/v2/{OrMenu-943e7760.js → OrMenu-c276db74.js} +15 -10
- package/dist/esm/v2/{OrModal-7b024663.js → OrModal-4e79e0d5.js} +1 -1
- package/dist/esm/v2/{OrNotification-4976dc40.js → OrNotification-eac3867f.js} +1 -1
- package/dist/esm/v2/{OrPagination-93d78a0d.js → OrPagination-1adbcadb.js} +24 -61
- package/dist/esm/v2/{OrProgress-9fc95bd7.js → OrProgress-b7d1c689.js} +3 -3
- package/dist/esm/v2/{OrSearch-37fac6da.js → OrSearch-7411388b.js} +1 -1
- package/dist/esm/v2/{OrSelect-45eb62ae.js → OrSelect-e31d1c8b.js} +2 -2
- package/dist/esm/v2/{OrSidebar-7c89f46c.js → OrSidebar-27236fbd.js} +158 -37
- package/dist/esm/v2/OrSidebarCollapseButton-cfe51a60.js +123 -0
- package/dist/esm/v2/{OrTabs-398348a5.js → OrTabs-96b0473d.js} +1 -1
- package/dist/esm/v2/{OrTag-a86928f2.js → OrTag-b2906865.js} +3 -1
- package/dist/esm/v2/{OrTooltip-4587b666.js → OrTooltip-629d44fc.js} +1 -1
- package/dist/esm/v2/components/index.js +22 -21
- package/dist/esm/v2/components/or-button-v3/index.js +1 -1
- package/dist/esm/v2/components/or-card-collection-v3/index.js +7 -7
- package/dist/esm/v2/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v2/components/or-empty-state-v3/index.js +1 -1
- package/dist/esm/v2/components/or-error-tag-v3/index.js +1 -1
- package/dist/esm/v2/components/or-icon-button-v3/index.js +2 -2
- package/dist/esm/v2/components/or-inline-input-v3/index.js +3 -3
- package/dist/esm/v2/components/or-inline-textarea-v3/index.js +3 -3
- package/dist/esm/v2/components/or-input-v3/index.js +3 -3
- package/dist/esm/v2/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/esm/v2/components/or-menu-v3/index.js +1 -1
- package/dist/esm/v2/components/or-menu-v3/styles.d.ts +1 -0
- package/dist/esm/v2/components/or-modal-v3/index.js +3 -3
- package/dist/esm/v2/components/or-notification-v3/index.js +3 -3
- package/dist/esm/v2/components/or-pagination-v3/OrPagination.vue.d.ts +0 -4
- package/dist/esm/v2/components/or-pagination-v3/index.js +5 -5
- package/dist/esm/v2/components/or-progress-v3/index.js +1 -1
- package/dist/esm/v2/components/or-progress-v3/styles.d.ts +1 -1
- package/dist/esm/v2/components/or-search-v3/index.js +4 -4
- package/dist/esm/v2/components/or-select-v3/index.js +5 -5
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/esm/v2/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/esm/v2/components/or-sidebar-v3/index.js +13 -1
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/index.js +16 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.d.ts +1 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +16 -0
- package/dist/esm/v2/components/or-sidebar-v3/partials/or-sidebar-collapse-button/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-sidebar-v3/styles.d.ts +7 -1
- package/dist/esm/v2/components/or-tabs-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tag-v3/index.js +3 -3
- package/dist/esm/v2/components/or-toast-v3/index.js +3 -3
- package/dist/esm/v2/components/or-tooltip-v3/index.js +1 -1
- package/dist/esm/v2/index.js +22 -21
- package/dist/esm/v2/{types-8c69b2c8.js → types-1f95d710.js} +1 -1
- package/dist/esm/v3/{OrButton-55dd2ad9.js → OrButton-c56998e7.js} +3 -3
- package/dist/esm/v3/{OrCardCollection-3a9ccb24.js → OrCardCollection-e4fde5b4.js} +4 -4
- package/dist/esm/v3/{OrConfirm-68068bd0.js → OrConfirm-37454a63.js} +2 -2
- package/dist/esm/v3/{OrEmptyState-cd3a4026.js → OrEmptyState-bb8e3145.js} +2 -2
- package/dist/esm/v3/{OrErrorTag-a3e6ef83.js → OrErrorTag-308119de.js} +2 -0
- package/dist/esm/v3/{OrIconButton-0047e3cd.js → OrIconButton-2dcfb83e.js} +1 -1
- package/dist/esm/v3/{OrInlineInput-6901da96.js → OrInlineInput-fbc35f85.js} +1 -1
- package/dist/esm/v3/{OrInlineTextarea-a618ec30.js → OrInlineTextarea-79da8697.js} +1 -1
- package/dist/esm/v3/{OrInput-27b9f02d.js → OrInput-bd054213.js} +1 -1
- package/dist/esm/v3/{OrMenu-fd2fe1e7.js → OrMenu-7f3ea117.js} +17 -13
- package/dist/esm/v3/{OrModal-70f2b811.js → OrModal-4219a6dc.js} +1 -1
- package/dist/esm/v3/{OrNotification-7173726b.js → OrNotification-0e682c7f.js} +1 -1
- package/dist/esm/v3/{OrPagination-781c119e.js → OrPagination-da9e5017.js} +26 -64
- package/dist/esm/v3/{OrProgress-4856808a.js → OrProgress-639ed5e8.js} +3 -3
- package/dist/esm/v3/{OrSearch-9e1efad2.js → OrSearch-5406bf03.js} +1 -1
- package/dist/esm/v3/{OrSelect-07834b65.js → OrSelect-466e50ca.js} +2 -2
- package/dist/esm/v3/OrSidebar-61d84c3e.js +313 -0
- package/dist/esm/v3/OrSidebarCollapseButton-1b9c83ef.js +94 -0
- package/dist/esm/v3/{OrTabs-34c67377.js → OrTabs-328d41b9.js} +1 -1
- package/dist/esm/v3/{OrTag-355e7a3e.js → OrTag-148ff9ae.js} +3 -1
- package/dist/esm/v3/{OrTooltip-4e670a38.js → OrTooltip-b07616f4.js} +1 -1
- package/dist/esm/v3/components/index.js +22 -21
- package/dist/esm/v3/components/or-button-v3/index.js +1 -1
- package/dist/esm/v3/components/or-card-collection-v3/index.js +7 -7
- package/dist/esm/v3/components/or-confirm-v3/index.js +5 -5
- package/dist/esm/v3/components/or-empty-state-v3/index.js +1 -1
- package/dist/esm/v3/components/or-error-tag-v3/index.js +1 -1
- package/dist/esm/v3/components/or-icon-button-v3/index.js +2 -2
- package/dist/esm/v3/components/or-inline-input-v3/index.js +3 -3
- package/dist/esm/v3/components/or-inline-textarea-v3/index.js +3 -3
- package/dist/esm/v3/components/or-input-v3/index.js +3 -3
- package/dist/esm/v3/components/or-menu-v3/OrMenu.vue.d.ts +2 -0
- package/dist/esm/v3/components/or-menu-v3/index.js +1 -1
- package/dist/esm/v3/components/or-menu-v3/styles.d.ts +1 -0
- package/dist/esm/v3/components/or-modal-v3/index.js +3 -3
- package/dist/esm/v3/components/or-notification-v3/index.js +3 -3
- package/dist/esm/v3/components/or-pagination-v3/OrPagination.vue.d.ts +0 -4
- package/dist/esm/v3/components/or-pagination-v3/index.js +5 -5
- package/dist/esm/v3/components/or-progress-v3/index.js +1 -1
- package/dist/esm/v3/components/or-progress-v3/styles.d.ts +1 -1
- package/dist/esm/v3/components/or-search-v3/index.js +4 -4
- package/dist/esm/v3/components/or-select-v3/index.js +5 -5
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.stories3.d.ts +36 -1
- package/dist/esm/v3/components/or-sidebar-v3/OrSidebar.vue.d.ts +49 -4
- package/dist/esm/v3/components/or-sidebar-v3/index.js +12 -1
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.d.ts +1 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/index.js +15 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.stories3.d.ts +12 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue.d.ts +53 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.d.ts +1 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.js +15 -0
- package/dist/esm/v3/components/or-sidebar-v3/partials/or-sidebar-collapse-button/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-sidebar-v3/styles.d.ts +7 -1
- package/dist/esm/v3/components/or-tabs-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tag-v3/index.js +3 -3
- package/dist/esm/v3/components/or-toast-v3/index.js +3 -3
- package/dist/esm/v3/components/or-tooltip-v3/index.js +1 -1
- package/dist/esm/v3/index.js +22 -21
- package/dist/esm/v3/{types-c1956faf.js → types-b79e4387.js} +1 -1
- package/package.json +2 -2
- package/src/components/or-button-v3/styles.ts +3 -3
- package/src/components/or-empty-state-v3/styles.ts +2 -2
- package/src/components/or-error-tag-v3/styles.ts +3 -0
- package/src/components/or-menu-v3/OrMenu.vue +26 -22
- package/src/components/or-menu-v3/styles.ts +5 -0
- package/src/components/or-pagination-v3/OrPagination.vue +42 -86
- package/src/components/or-pagination-v3/styles.ts +1 -1
- package/src/components/or-progress-v3/styles.ts +4 -4
- package/src/components/or-sidebar-v3/OrSidebar.docs.mdx +6 -0
- package/src/components/or-sidebar-v3/OrSidebar.stories3.ts +253 -12
- package/src/components/or-sidebar-v3/OrSidebar.vue +130 -23
- package/src/components/or-sidebar-v3/partials/index.ts +1 -0
- package/src/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.stories3.ts +48 -0
- package/src/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue +79 -0
- package/src/components/or-sidebar-v3/partials/or-sidebar-collapse-button/index.ts +1 -0
- package/src/components/or-sidebar-v3/partials/or-sidebar-collapse-button/styles.ts +50 -0
- package/src/components/or-sidebar-v3/styles.ts +117 -12
- package/src/components/or-tag-v3/OrTag.stories3.ts +5 -5
- package/src/components/or-tag-v3/styles.ts +3 -0
- package/src/components/or-tooltip-v3/styles.ts +1 -1
- package/dist/bundled/v3/OrSidebar.vue_vue_type_script_lang-d298c2fa.js +0 -181
- package/dist/esm/v3/OrSidebar-5d97c7cc.js +0 -206
package/src/components/or-sidebar-v3/partials/or-sidebar-collapse-button/OrSidebarCollapseButton.vue
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="root"
|
|
4
|
+
:class="rootStyles"
|
|
5
|
+
>
|
|
6
|
+
<or-icon-button
|
|
7
|
+
:class="buttonStyles"
|
|
8
|
+
:icon="{ icon, size: 'inherit' }"
|
|
9
|
+
color="inherit"
|
|
10
|
+
@click="$emit('update:modelValue', !modelValue)"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
import _ from 'lodash';
|
|
17
|
+
import { computed, defineComponent, PropType, ref } from 'vue-demi';
|
|
18
|
+
import { OrSidebarPlacement } from '../../props';
|
|
19
|
+
import { OrIconButtonV3 as OrIconButton } from '../../../or-icon-button-v3';
|
|
20
|
+
import { CollapseButton, CollapseButtonContainer } from './styles';
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
name: 'OrSidebarCollapseButton',
|
|
24
|
+
|
|
25
|
+
components: {
|
|
26
|
+
OrIconButton,
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
model: {
|
|
30
|
+
prop: 'modelValue',
|
|
31
|
+
event: 'update:modelValue',
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
props: {
|
|
35
|
+
/**
|
|
36
|
+
* Must be `true` if sidebar is collapsed.
|
|
37
|
+
*/
|
|
38
|
+
modelValue: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: false,
|
|
41
|
+
},
|
|
42
|
+
side: {
|
|
43
|
+
type: String as PropType<OrSidebarPlacement>,
|
|
44
|
+
default: OrSidebarPlacement.right,
|
|
45
|
+
validator: (value?: any) => _.includes(_.values(OrSidebarPlacement), value),
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
emits: ['update:modelValue'],
|
|
50
|
+
|
|
51
|
+
expose: ['root'],
|
|
52
|
+
|
|
53
|
+
setup(props) {
|
|
54
|
+
// Refs
|
|
55
|
+
const root = ref<InstanceType<typeof HTMLDivElement>>();
|
|
56
|
+
|
|
57
|
+
const rootStyles = computed(() => [
|
|
58
|
+
'or-sidebar-collapse-button',
|
|
59
|
+
...CollapseButtonContainer,
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
const buttonStyles = computed(() => [
|
|
63
|
+
...CollapseButton,
|
|
64
|
+
]);
|
|
65
|
+
|
|
66
|
+
const icon = computed(() => (props.side === OrSidebarPlacement.left !== props.modelValue) ?
|
|
67
|
+
'keyboard_arrow_left' :
|
|
68
|
+
'keyboard_arrow_right',
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
root,
|
|
73
|
+
rootStyles,
|
|
74
|
+
buttonStyles,
|
|
75
|
+
icon,
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as OrSidebarCollapseButton } from './OrSidebarCollapseButton.vue';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export const CollapseButtonContainer: string[] = [
|
|
2
|
+
// Box
|
|
3
|
+
'w-[24px]',
|
|
4
|
+
'h-[24px]',
|
|
5
|
+
'rounded-full',
|
|
6
|
+
|
|
7
|
+
// Theme
|
|
8
|
+
'text-primary dark:text-primary-dark',
|
|
9
|
+
'bg-background dark:bg-background-dark',
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export const CollapseButton: string[] = [
|
|
13
|
+
// Box
|
|
14
|
+
'w-[24px]',
|
|
15
|
+
'h-[24px]',
|
|
16
|
+
'rounded-full',
|
|
17
|
+
|
|
18
|
+
// Typography
|
|
19
|
+
'!text-[16px]',
|
|
20
|
+
|
|
21
|
+
// Borders
|
|
22
|
+
'!border-[1px]',
|
|
23
|
+
'!border-solid',
|
|
24
|
+
|
|
25
|
+
// Theme
|
|
26
|
+
'!text-primary dark:!text-primary-dark',
|
|
27
|
+
'!bg-background dark:!bg-background-dark',
|
|
28
|
+
'!border-outline-variant dark:!border-outline-variant-dark',
|
|
29
|
+
'!outline-none',
|
|
30
|
+
|
|
31
|
+
// Theme (hover)
|
|
32
|
+
'hover:!text-primary hover:dark:!text-primary-dark',
|
|
33
|
+
'hover:!bg-primary-opacity-0-08 dark:hover:!bg-primary-opacity-0-08-dark',
|
|
34
|
+
'hover:!border-outline dark:hover:!border-outline-dark',
|
|
35
|
+
|
|
36
|
+
// Theme (active)
|
|
37
|
+
'active:!text-primary active:dark:!text-primary-dark',
|
|
38
|
+
'active:!bg-primary-opacity-0-12 dark:active:!bg-primary-opacity-0-12-dark',
|
|
39
|
+
'active:!border-primary dark:active:!border-primary-dark',
|
|
40
|
+
|
|
41
|
+
// Theme (focus)
|
|
42
|
+
'focus:!text-primary focus:dark:!text-primary-dark',
|
|
43
|
+
'focus:!bg-primary-opacity-0-12 dark:focus:!bg-primary-opacity-0-12-dark',
|
|
44
|
+
'focus:!border-outline dark:focus:!border-outline-dark',
|
|
45
|
+
|
|
46
|
+
// Theme (disabled)
|
|
47
|
+
'disabled:!text-on-disabled disabled:dark:!text-on-disabled-dark',
|
|
48
|
+
'disabled:!bg-background disabled:dark:!bg-background-dark',
|
|
49
|
+
'disabled:!border-outline-variant disabled:dark:!border-outline-variant-dark',
|
|
50
|
+
];
|
|
@@ -4,28 +4,100 @@ export const SidebarRoot: string[] = [
|
|
|
4
4
|
// Position
|
|
5
5
|
'relative',
|
|
6
6
|
|
|
7
|
+
// Layout
|
|
8
|
+
'flex',
|
|
9
|
+
'flex-row',
|
|
10
|
+
'shrink-0',
|
|
11
|
+
|
|
12
|
+
// Box
|
|
13
|
+
'min-w-0',
|
|
14
|
+
'h-auto',
|
|
15
|
+
'p-0',
|
|
16
|
+
|
|
17
|
+
// Theme
|
|
18
|
+
'bg-background',
|
|
19
|
+
'dark:bg-background-dark',
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export const SidebarBar: string[] = [
|
|
23
|
+
// Position
|
|
24
|
+
'relative',
|
|
25
|
+
|
|
7
26
|
// Layout
|
|
8
27
|
'flex',
|
|
9
28
|
'flex-col',
|
|
10
29
|
'shrink-0',
|
|
30
|
+
'grow',
|
|
11
31
|
|
|
12
32
|
// Box
|
|
13
33
|
'min-h-0',
|
|
14
34
|
'p-0',
|
|
35
|
+
|
|
36
|
+
// Theme
|
|
37
|
+
'text-on-background',
|
|
38
|
+
'dark:text-on-background-dark',
|
|
39
|
+
|
|
40
|
+
// Transition
|
|
41
|
+
'transition-[width]',
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
export const SidebarToolbar: string[] = [
|
|
45
|
+
// Position
|
|
46
|
+
'relative',
|
|
47
|
+
|
|
48
|
+
// Layout
|
|
49
|
+
'flex',
|
|
50
|
+
'flex-col',
|
|
51
|
+
'shrink-0',
|
|
52
|
+
'grow',
|
|
53
|
+
'overflow-auto',
|
|
54
|
+
'items-center',
|
|
55
|
+
|
|
56
|
+
// Sizing
|
|
57
|
+
'gap-md',
|
|
58
|
+
|
|
59
|
+
// Box
|
|
60
|
+
'min-h-0',
|
|
61
|
+
'min-w-xl',
|
|
62
|
+
'p-[6px]',
|
|
63
|
+
'py-md+',
|
|
64
|
+
|
|
65
|
+
// Theme
|
|
66
|
+
'text-outline',
|
|
67
|
+
'dark:text-outline-dark',
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
export const CollapsibleSidebarToolbar: string[] = [
|
|
71
|
+
'pt-[56px]',
|
|
15
72
|
];
|
|
16
73
|
|
|
17
|
-
export const
|
|
74
|
+
export const SidebarSides: Record<OrSidebarPlacement, string[]> = {
|
|
18
75
|
[OrSidebarPlacement.left]: [
|
|
19
76
|
// Borders
|
|
20
77
|
'border-r-[1px]',
|
|
21
78
|
'border-r-solid',
|
|
22
|
-
'border-r-
|
|
79
|
+
'border-r-outline-variant dark:border-r-outline-variant-dark',
|
|
23
80
|
],
|
|
24
81
|
[OrSidebarPlacement.right]: [
|
|
25
82
|
// Borders
|
|
26
83
|
'border-l-[1px]',
|
|
27
84
|
'border-l-solid',
|
|
28
|
-
'border-l-
|
|
85
|
+
'border-l-outline-variant dark:border-l-outline-variant-dark',
|
|
86
|
+
],
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const SidebarToolbarSides: Record<OrSidebarPlacement, string[]> = {
|
|
90
|
+
[OrSidebarPlacement.left]: [
|
|
91
|
+
// Borders
|
|
92
|
+
'border-r-[1px]',
|
|
93
|
+
'border-r-solid',
|
|
94
|
+
'border-r-outline-variant dark:border-r-outline-variant-dark',
|
|
95
|
+
],
|
|
96
|
+
[OrSidebarPlacement.right]: [
|
|
97
|
+
// Borders
|
|
98
|
+
'border-l-[1px]',
|
|
99
|
+
'border-l-solid',
|
|
100
|
+
'border-l-outline-variant dark:border-l-outline-variant-dark',
|
|
29
101
|
],
|
|
30
102
|
};
|
|
31
103
|
|
|
@@ -36,7 +108,7 @@ export const SidebarResize: string[] = [
|
|
|
36
108
|
'z-[1]',
|
|
37
109
|
|
|
38
110
|
// Box
|
|
39
|
-
'w-
|
|
111
|
+
'w-sm+',
|
|
40
112
|
'h-[100%]',
|
|
41
113
|
|
|
42
114
|
// Cursor
|
|
@@ -50,7 +122,7 @@ export const SidebarResizeSides: Record<OrSidebarPlacement, string[]> = {
|
|
|
50
122
|
|
|
51
123
|
// Borders
|
|
52
124
|
'hover:border-r-2',
|
|
53
|
-
'hover:border-r-primary hover:dark:border-r-primary-dark',
|
|
125
|
+
'hover:border-r-primary-hover hover:dark:border-r-primary-hover-dark',
|
|
54
126
|
|
|
55
127
|
// Transition
|
|
56
128
|
'transition-[border-right]',
|
|
@@ -61,23 +133,42 @@ export const SidebarResizeSides: Record<OrSidebarPlacement, string[]> = {
|
|
|
61
133
|
|
|
62
134
|
// Borders
|
|
63
135
|
'hover:border-l-2',
|
|
64
|
-
'hover:border-l-primary hover:dark:border-l-primary-dark',
|
|
136
|
+
'hover:border-l-primary-hover hover:dark:border-l-primary-hover-dark',
|
|
65
137
|
|
|
66
138
|
// Transition
|
|
67
139
|
'transition-[border-left]',
|
|
68
140
|
],
|
|
69
141
|
};
|
|
70
142
|
|
|
143
|
+
export const SidebarCollapseButton: string[] = [
|
|
144
|
+
// Position
|
|
145
|
+
'absolute',
|
|
146
|
+
'top-md',
|
|
147
|
+
'inset-y-none',
|
|
148
|
+
'z-[1]',
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
export const SidebarCollapseButtonSides: Record<OrSidebarPlacement, string[]> = {
|
|
152
|
+
[OrSidebarPlacement.left]: [
|
|
153
|
+
// Position
|
|
154
|
+
'-right-[12px]',
|
|
155
|
+
],
|
|
156
|
+
[OrSidebarPlacement.right]: [
|
|
157
|
+
// Position
|
|
158
|
+
'-left-[12px]',
|
|
159
|
+
],
|
|
160
|
+
};
|
|
161
|
+
|
|
71
162
|
export const SidebarResizingSides: Record<OrSidebarPlacement, string[]> = {
|
|
72
163
|
[OrSidebarPlacement.left]: [
|
|
73
164
|
// Borders
|
|
74
165
|
'border-r-2',
|
|
75
|
-
'border-r-primary dark:border-r-primary-dark',
|
|
166
|
+
'border-r-primary-hover dark:border-r-primary-hover-dark',
|
|
76
167
|
],
|
|
77
168
|
[OrSidebarPlacement.right]: [
|
|
78
169
|
// Borders
|
|
79
170
|
'border-l-2',
|
|
80
|
-
'border-l-primary dark:border-l-primary-dark',
|
|
171
|
+
'border-l-primary-hover dark:border-l-primary-hover-dark',
|
|
81
172
|
],
|
|
82
173
|
};
|
|
83
174
|
|
|
@@ -86,14 +177,24 @@ export const SidebarMain: string[] = [
|
|
|
86
177
|
'flex',
|
|
87
178
|
'flex-col',
|
|
88
179
|
'grow',
|
|
180
|
+
'overflow-x-hidden',
|
|
89
181
|
|
|
90
182
|
// Box
|
|
91
183
|
'min-h-0',
|
|
92
184
|
];
|
|
93
185
|
|
|
94
186
|
export const SidebarHeader: string[] = [
|
|
95
|
-
//
|
|
187
|
+
// Layout
|
|
188
|
+
'shrink-0',
|
|
189
|
+
'overflow-hidden',
|
|
190
|
+
|
|
191
|
+
// Sizing
|
|
96
192
|
'p-md',
|
|
193
|
+
|
|
194
|
+
// Typography
|
|
195
|
+
'typography-headline-2',
|
|
196
|
+
'whitespace-nowrap',
|
|
197
|
+
'text-ellipsis',
|
|
97
198
|
];
|
|
98
199
|
|
|
99
200
|
export const SidebarContent: string[] = [
|
|
@@ -101,16 +202,20 @@ export const SidebarContent: string[] = [
|
|
|
101
202
|
'grow',
|
|
102
203
|
'overflow-auto',
|
|
103
204
|
|
|
104
|
-
//
|
|
205
|
+
// Sizing
|
|
105
206
|
'p-md',
|
|
106
207
|
];
|
|
107
208
|
|
|
108
209
|
export const SidebarFooter: string[] = [
|
|
109
|
-
//
|
|
210
|
+
// Layout
|
|
211
|
+
'shrink-0',
|
|
212
|
+
'overflow-x-hidden',
|
|
213
|
+
|
|
214
|
+
// Sizing
|
|
110
215
|
'p-md',
|
|
111
216
|
|
|
112
217
|
// Borders
|
|
113
218
|
'border-t-[1px]',
|
|
114
219
|
'border-t-solid',
|
|
115
|
-
'border-t-
|
|
220
|
+
'border-t-outline-variant dark:border-t-outline-variant-dark',
|
|
116
221
|
];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { action } from '@storybook/addon-actions';
|
|
2
2
|
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
3
|
import Faker from 'faker';
|
|
4
|
-
import { ref } from 'vue-demi';
|
|
5
|
-
import { useOverflow } from '../../hooks';
|
|
6
|
-
import { OrButtonV3 as OrButton } from '../or-button-v3';
|
|
7
|
-
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
8
4
|
import OrTagDocs from './OrTag.docs.mdx';
|
|
9
5
|
import OrTag from './OrTag.vue';
|
|
10
6
|
import { TagColor, TagVariant } from './props';
|
|
7
|
+
import { OrButtonV3 as OrButton } from '../or-button-v3';
|
|
8
|
+
import { OrPopoverV3 as OrPopover } from '../or-popover-v3';
|
|
9
|
+
import { useOverflow } from '../../hooks';
|
|
10
|
+
import { ref } from 'vue-demi';
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
title: 'Components/Tag',
|
|
@@ -77,7 +77,7 @@ const Template: StoryFn<typeof OrTag> = (args) => ({
|
|
|
77
77
|
@blur="handleBlur"
|
|
78
78
|
@reset="handleReset"
|
|
79
79
|
>
|
|
80
|
-
|
|
80
|
+
${args.default}
|
|
81
81
|
</OrTag>
|
|
82
82
|
`,
|
|
83
83
|
});
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import { useDraggable, useElementBounding } from '@vueuse/core';
|
|
2
|
-
import _ from 'lodash';
|
|
3
|
-
import { defineComponent, ref, computed, watch } from 'vue';
|
|
4
|
-
|
|
5
|
-
var OrSidebarPlacement;
|
|
6
|
-
(function (OrSidebarPlacement) {
|
|
7
|
-
OrSidebarPlacement["left"] = "left";
|
|
8
|
-
OrSidebarPlacement["right"] = "right";
|
|
9
|
-
})(OrSidebarPlacement || (OrSidebarPlacement = {}));
|
|
10
|
-
|
|
11
|
-
const SidebarRoot = [
|
|
12
|
-
// Position
|
|
13
|
-
'relative',
|
|
14
|
-
// Layout
|
|
15
|
-
'flex', 'flex-col', 'shrink-0',
|
|
16
|
-
// Box
|
|
17
|
-
'min-h-0', 'p-0'];
|
|
18
|
-
const SidebarRootSides = {
|
|
19
|
-
[OrSidebarPlacement.left]: [
|
|
20
|
-
// Borders
|
|
21
|
-
'border-r-[1px]', 'border-r-solid', 'border-r-secondary dark:border-r-secondary-dark'],
|
|
22
|
-
[OrSidebarPlacement.right]: [
|
|
23
|
-
// Borders
|
|
24
|
-
'border-l-[1px]', 'border-l-solid', 'border-l-secondary dark:border-l-secondary-dark']
|
|
25
|
-
};
|
|
26
|
-
const SidebarResize = [
|
|
27
|
-
// Position
|
|
28
|
-
'absolute', 'inset-y-none', 'z-[1]',
|
|
29
|
-
// Box
|
|
30
|
-
'w-[12px]', 'h-[100%]',
|
|
31
|
-
// Cursor
|
|
32
|
-
'cursor-ew-resize'];
|
|
33
|
-
const SidebarResizeSides = {
|
|
34
|
-
[OrSidebarPlacement.left]: [
|
|
35
|
-
// Position
|
|
36
|
-
'-right-[1px]',
|
|
37
|
-
// Borders
|
|
38
|
-
'hover:border-r-2', 'hover:border-r-primary hover:dark:border-r-primary-dark',
|
|
39
|
-
// Transition
|
|
40
|
-
'transition-[border-right]'],
|
|
41
|
-
[OrSidebarPlacement.right]: [
|
|
42
|
-
// Position
|
|
43
|
-
'-left-[1px]',
|
|
44
|
-
// Borders
|
|
45
|
-
'hover:border-l-2', 'hover:border-l-primary hover:dark:border-l-primary-dark',
|
|
46
|
-
// Transition
|
|
47
|
-
'transition-[border-left]']
|
|
48
|
-
};
|
|
49
|
-
const SidebarResizingSides = {
|
|
50
|
-
[OrSidebarPlacement.left]: [
|
|
51
|
-
// Borders
|
|
52
|
-
'border-r-2', 'border-r-primary dark:border-r-primary-dark'],
|
|
53
|
-
[OrSidebarPlacement.right]: [
|
|
54
|
-
// Borders
|
|
55
|
-
'border-l-2', 'border-l-primary dark:border-l-primary-dark']
|
|
56
|
-
};
|
|
57
|
-
const SidebarMain = [
|
|
58
|
-
// Layout
|
|
59
|
-
'flex', 'flex-col', 'grow',
|
|
60
|
-
// Box
|
|
61
|
-
'min-h-0'];
|
|
62
|
-
const SidebarHeader = [
|
|
63
|
-
// Spacing
|
|
64
|
-
'p-md'];
|
|
65
|
-
const SidebarContent = [
|
|
66
|
-
// Layout
|
|
67
|
-
'grow', 'overflow-auto',
|
|
68
|
-
// Spacing
|
|
69
|
-
'p-md'];
|
|
70
|
-
const SidebarFooter = [
|
|
71
|
-
// Spacing
|
|
72
|
-
'p-md',
|
|
73
|
-
// Borders
|
|
74
|
-
'border-t-[1px]', 'border-t-solid', 'border-t-secondary dark:border-t-secondary-dark'];
|
|
75
|
-
|
|
76
|
-
var script = defineComponent({
|
|
77
|
-
name: 'OrSidebar',
|
|
78
|
-
props: {
|
|
79
|
-
width: {
|
|
80
|
-
type: Number,
|
|
81
|
-
required: false,
|
|
82
|
-
default: 0,
|
|
83
|
-
validator: value => _.isNumber(value) && value >= 0
|
|
84
|
-
},
|
|
85
|
-
minimumWidth: {
|
|
86
|
-
type: Number,
|
|
87
|
-
required: false,
|
|
88
|
-
default: 350,
|
|
89
|
-
validator: value => _.isNumber(value) && value >= 0
|
|
90
|
-
},
|
|
91
|
-
/**
|
|
92
|
-
* User may put the component on the right or the left side of a container.
|
|
93
|
-
* This property mirrors the resizing behavior (drag direction) and styling (horizontal border) of the sidebar.
|
|
94
|
-
*
|
|
95
|
-
* Note: the property doesn't reposition the component in the parent container.
|
|
96
|
-
* @values left, right
|
|
97
|
-
*/
|
|
98
|
-
side: {
|
|
99
|
-
type: String,
|
|
100
|
-
default: OrSidebarPlacement.right,
|
|
101
|
-
validator: value => _.includes(_.values(OrSidebarPlacement), value)
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
emits: ['change:width'],
|
|
105
|
-
setup(props, {
|
|
106
|
-
emit
|
|
107
|
-
}) {
|
|
108
|
-
// Refs
|
|
109
|
-
const root = ref();
|
|
110
|
-
const resizeBar = ref(null);
|
|
111
|
-
const parentContainer = computed(() => {
|
|
112
|
-
var _a;
|
|
113
|
-
return (_a = root.value) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
114
|
-
});
|
|
115
|
-
// State
|
|
116
|
-
const startPositionX = ref(0);
|
|
117
|
-
const isResizing = ref(false);
|
|
118
|
-
const localWidth = ref(props.width >= props.minimumWidth ? props.width : props.minimumWidth);
|
|
119
|
-
// Styles
|
|
120
|
-
const sidebarStyle = computed(() => ({
|
|
121
|
-
width: localWidth.value + 'px'
|
|
122
|
-
}));
|
|
123
|
-
const rootStyles = computed(() => ['or-sidebar', ...SidebarRoot, ...SidebarRootSides[props.side]]);
|
|
124
|
-
const resizeStyles = computed(() => [...SidebarResize, ...SidebarResizeSides[props.side], ...(isResizing.value ? SidebarResizingSides[props.side] : [])]);
|
|
125
|
-
const mainStyles = computed(() => [...SidebarMain]);
|
|
126
|
-
const headerStyles = computed(() => [...SidebarHeader]);
|
|
127
|
-
const contentStyles = computed(() => [...SidebarContent]);
|
|
128
|
-
const footerStyles = computed(() => [...SidebarFooter]);
|
|
129
|
-
// Effects
|
|
130
|
-
useDraggable(resizeBar, {
|
|
131
|
-
preventDefault: true,
|
|
132
|
-
onStart: (position, event) => {
|
|
133
|
-
document.body.style.cursor = 'ew-resize';
|
|
134
|
-
document.body.style.userSelect = 'none';
|
|
135
|
-
startPositionX.value = event.x;
|
|
136
|
-
isResizing.value = true;
|
|
137
|
-
},
|
|
138
|
-
onMove: position => {
|
|
139
|
-
const delta = (position.x - startPositionX.value) * (props.side === OrSidebarPlacement.left ? -1 : 1);
|
|
140
|
-
const newWidth = localWidth.value - delta;
|
|
141
|
-
localWidth.value = newWidth > maximumWidth.value ? maximumWidth.value : newWidth < props.minimumWidth ? props.minimumWidth : newWidth;
|
|
142
|
-
startPositionX.value = position.x;
|
|
143
|
-
},
|
|
144
|
-
onEnd: () => {
|
|
145
|
-
document.body.style.cursor = '';
|
|
146
|
-
document.body.style.userSelect = '';
|
|
147
|
-
isResizing.value = false;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
const {
|
|
151
|
-
width: maximumWidth
|
|
152
|
-
} = useElementBounding(parentContainer);
|
|
153
|
-
watch(() => props.width, newValue => {
|
|
154
|
-
if (newValue !== localWidth.value) {
|
|
155
|
-
localWidth.value = newValue > maximumWidth.value ? maximumWidth.value : newValue < props.minimumWidth ? props.minimumWidth : newValue;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
watch(() => props.minimumWidth, newMinimum => {
|
|
159
|
-
if (newMinimum > localWidth.value) localWidth.value = newMinimum;
|
|
160
|
-
});
|
|
161
|
-
watch(maximumWidth, newMaximum => {
|
|
162
|
-
if (newMaximum < localWidth.value) localWidth.value = newMaximum;
|
|
163
|
-
});
|
|
164
|
-
watch(localWidth, val => emit('change:width', val));
|
|
165
|
-
return {
|
|
166
|
-
root,
|
|
167
|
-
resizeBar,
|
|
168
|
-
isResizing,
|
|
169
|
-
localWidth,
|
|
170
|
-
sidebarStyle,
|
|
171
|
-
rootStyles,
|
|
172
|
-
resizeStyles,
|
|
173
|
-
mainStyles,
|
|
174
|
-
headerStyles,
|
|
175
|
-
contentStyles,
|
|
176
|
-
footerStyles
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
export { OrSidebarPlacement as O, script as s };
|