@oneb/ui-vue 0.3.32 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChevronLeftIcon-7505e081.cjs +1 -0
- package/dist/ChevronLeftIcon-bb9adb5b.js +20 -0
- package/dist/ChevronRightIcon-2992cf0d.cjs +1 -0
- package/dist/ChevronRightIcon-b0585768.js +20 -0
- package/dist/ChevronUpIcon-64a673e1.cjs +1 -0
- package/dist/{ChevronRightIcon-4549a26b.js → ChevronUpIcon-c43f27a9.js} +2 -19
- package/dist/LogoOneb-b6ac382e.cjs +1 -0
- package/dist/LogoOneb-ddb388a4.js +16 -0
- package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
- package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-2c508e8a.js +79 -0
- package/dist/OneDropdownAuto.vue_vue_type_script_setup_true_lang-bf923b04.cjs +1 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-b89117e7.js +521 -0
- package/dist/OneFormInput.vue_vue_type_script_setup_true_lang-f6f7cd96.cjs +1 -0
- package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-2a2051d7.js} +120 -214
- package/dist/OneHelpMenu-78d9348a.cjs +1 -0
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-05266fc3.cjs +1 -0
- package/dist/OneMarkdown.vue_vue_type_script_setup_true_lang-bb2219c7.js +18 -0
- package/dist/OneModal-02a9a173.js +189 -0
- package/dist/OneModal-0e92c039.cjs +1 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-c492c128.js +25 -0
- package/dist/OneTooltip.vue_vue_type_script_setup_true_lang-e83a81ea.cjs +1 -0
- package/dist/SpinnerIcon-01be39fe.cjs +1 -0
- package/dist/{SpinnerIcon-74648c98.js → SpinnerIcon-516264ba.js} +5 -6
- package/dist/button/index.cjs +1 -1
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +3 -4
- package/dist/checkbox/checkbox.d.ts +5 -0
- package/dist/checkbox/index.cjs +1 -1
- package/dist/checkbox/index.js +40 -34
- package/dist/chips/OneChips.vue.d.ts +2 -0
- package/dist/chips/chips.d.ts +25 -0
- package/dist/chips/index.cjs +1 -0
- package/dist/chips/index.d.ts +3 -0
- package/dist/chips/index.js +62 -0
- package/dist/clipboard-494e1513.cjs +1 -0
- package/dist/clipboard-733b79a1.js +22 -0
- package/dist/common/OneDetailsList.vue.d.ts +2 -0
- package/dist/common/OneDetailsRow.vue.d.ts +2 -0
- package/dist/common/index.cjs +1 -1
- package/dist/common/index.d.ts +2 -0
- package/dist/common/index.js +68 -16
- package/dist/composables/index.cjs +1 -0
- package/dist/composables/index.d.ts +18 -0
- package/dist/composables/index.js +91 -0
- package/dist/composables/useAsyncMethod.d.ts +17 -0
- package/dist/composables/useAsyncSelect.d.ts +26 -0
- package/dist/composables/useConfirm.d.ts +27 -0
- package/dist/composables/useCursorList.d.ts +42 -0
- package/dist/composables/useDebouncedRef.d.ts +6 -0
- package/dist/composables/useFileUpload.d.ts +21 -0
- package/dist/composables/useFormSubmit.d.ts +23 -0
- package/dist/composables/useIsMobile.d.ts +8 -0
- package/dist/confirm/OneConfirmHost.vue.d.ts +2 -0
- package/dist/confirm/confirm.d.ts +10 -0
- package/dist/confirm/index.cjs +1 -0
- package/dist/confirm/index.d.ts +5 -0
- package/dist/confirm/index.js +59 -0
- package/dist/cursorList/OneCursorList.vue.d.ts +2 -0
- package/dist/cursorList/index.cjs +1 -0
- package/dist/cursorList/index.d.ts +3 -0
- package/dist/cursorList/index.js +78 -0
- package/dist/dataTable/index.cjs +1 -1
- package/dist/dataTable/index.js +256 -301
- package/dist/dateTime/OneDateTime.vue.d.ts +2 -0
- package/dist/dateTime/dateTime.d.ts +43 -0
- package/dist/dateTime/index.cjs +1 -0
- package/dist/dateTime/index.d.ts +3 -0
- package/dist/dateTime/index.js +66 -0
- package/dist/dropdown/index.cjs +1 -1
- package/dist/dropdown/index.js +302 -376
- package/dist/dropdown-5cb64ab7.cjs +1 -0
- package/dist/dropdown-c81fb945.js +101 -0
- package/dist/entityPicker/index.cjs +1 -1
- package/dist/entityPicker/index.js +57 -57
- package/dist/entityPicker/useEntityModal.d.ts +7 -3
- package/dist/errorsPage/OneCrashScreen.vue.d.ts +2 -0
- package/dist/errorsPage/OneErrorHero.vue.d.ts +2 -0
- package/dist/errorsPage/OneNotFoundPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneServerErrorPage.vue.d.ts +2 -0
- package/dist/errorsPage/OneSnakeGame.vue.d.ts +2 -0
- package/dist/errorsPage/createAppErrorHandler.d.ts +24 -0
- package/dist/errorsPage/errorsType.d.ts +5 -0
- package/dist/errorsPage/index.cjs +1 -1
- package/dist/errorsPage/index.d.ts +8 -0
- package/dist/errorsPage/index.js +543 -28
- package/dist/errorsPage/useCrashState.d.ts +10 -0
- package/dist/fileUpload/OneDropzone.vue.d.ts +2 -0
- package/dist/fileUpload/OneFileUpload.vue.d.ts +2 -0
- package/dist/fileUpload/fileUpload.d.ts +17 -0
- package/dist/fileUpload/index.cjs +1 -0
- package/dist/fileUpload/index.d.ts +6 -0
- package/dist/fileUpload/index.js +228 -0
- package/dist/filterBuilder/OneFilterBuilder.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterGroup.vue.d.ts +2 -0
- package/dist/filterBuilder/OneFilterRule.vue.d.ts +2 -0
- package/dist/filterBuilder/filterBuilder.d.ts +17 -0
- package/dist/filterBuilder/index.cjs +1 -0
- package/dist/filterBuilder/index.d.ts +5 -0
- package/dist/filterBuilder/index.js +268 -0
- package/dist/form/form.d.ts +1 -1
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.js +66 -574
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +101 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +244 -104
- package/dist/indicators/OneStatCard.vue.d.ts +2 -0
- package/dist/indicators/index.cjs +1 -1
- package/dist/indicators/index.d.ts +1 -0
- package/dist/indicators/index.js +66 -29
- package/dist/label/index.cjs +1 -1
- package/dist/label/index.js +5 -5
- package/dist/layout/LogoOneb.vue.d.ts +2 -0
- package/dist/layout/OneAuthLayout.vue.d.ts +2 -0
- package/dist/layout/OneBackButton.vue.d.ts +2 -0
- package/dist/layout/OneBreadcrumbs.vue.d.ts +2 -0
- package/dist/layout/OneEmptyLayout.vue.d.ts +6 -0
- package/dist/layout/OneGridLayout.vue.d.ts +2 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.d.ts +7 -1
- package/dist/layout/index.js +1059 -765
- package/dist/layout/layout.d.ts +11 -0
- package/dist/modal/OneModalHost.vue.d.ts +2 -0
- package/dist/modal/index.cjs +1 -1
- package/dist/modal/index.d.ts +3 -0
- package/dist/modal/index.js +84 -27
- package/dist/modal/modal.d.ts +9 -0
- package/dist/modal/useModalStack.d.ts +20 -0
- package/dist/notifications/OneNotificationItem.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsBell.vue.d.ts +2 -0
- package/dist/notifications/OneNotificationsPanel.vue.d.ts +2 -0
- package/dist/notifications/index.cjs +1 -0
- package/dist/notifications/index.d.ts +7 -0
- package/dist/notifications/index.js +477 -0
- package/dist/notifications/notifications.d.ts +53 -0
- package/dist/notifications/useNotifyfeed.d.ts +32 -0
- package/dist/periodPicker/index.cjs +1 -1
- package/dist/periodPicker/index.js +126 -139
- package/dist/popover/OnePopover.vue.d.ts +2 -0
- package/dist/popover/index.cjs +1 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +104 -0
- package/dist/popover/popover.d.ts +31 -0
- package/dist/progress/OneProgress.vue.d.ts +2 -0
- package/dist/progress/index.cjs +1 -0
- package/dist/progress/index.d.ts +3 -0
- package/dist/progress/index.js +74 -0
- package/dist/progress/progress.d.ts +32 -0
- package/dist/searchInput/OneSearchInput.vue.d.ts +2 -0
- package/dist/searchInput/index.cjs +1 -0
- package/dist/searchInput/index.d.ts +3 -0
- package/dist/searchInput/index.js +103 -0
- package/dist/searchInput/searchInput.d.ts +39 -0
- package/dist/settings/OneSettingsLayout.vue.d.ts +2 -0
- package/dist/settings/OneSettingsRow.vue.d.ts +2 -0
- package/dist/settings/OneSettingsSection.vue.d.ts +2 -0
- package/dist/settings/index.cjs +1 -0
- package/dist/settings/index.d.ts +4 -0
- package/dist/settings/index.js +116 -0
- package/dist/spinner/OneSpinner.vue.d.ts +2 -0
- package/dist/spinner/index.cjs +1 -0
- package/dist/spinner/index.d.ts +3 -0
- package/dist/spinner/index.js +30 -0
- package/dist/spinner/spinner.d.ts +10 -0
- package/dist/stageBadge/index.cjs +1 -1
- package/dist/stageBadge/index.js +18 -16
- package/dist/stepper/OneStepper.vue.d.ts +2 -0
- package/dist/stepper/index.cjs +1 -0
- package/dist/stepper/index.d.ts +3 -0
- package/dist/stepper/index.js +53 -0
- package/dist/stepper/stepper.d.ts +24 -0
- package/dist/style.css +1 -1
- package/dist/switch/index.cjs +1 -1
- package/dist/switch/index.js +3 -4
- package/dist/tabs/OneTab.vue.d.ts +2 -0
- package/dist/tabs/OneTabs.vue.d.ts +2 -0
- package/dist/tabs/index.cjs +1 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +64 -0
- package/dist/tabs/tabs.d.ts +7 -0
- package/dist/toast/OneMascotToast.vue.d.ts +2 -0
- package/dist/toast/RabbitIcon.vue.d.ts +2 -0
- package/dist/toast/index.cjs +1 -1
- package/dist/toast/index.d.ts +4 -0
- package/dist/toast/index.js +139 -74
- package/dist/toast/useMascotToast.d.ts +12 -0
- package/dist/tooltip/OneTooltip.vue.d.ts +2 -0
- package/dist/tooltip/index.cjs +2 -2
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +33 -30
- package/dist/useConfirm-6344b49d.cjs +1 -0
- package/dist/useConfirm-74e99a5c.js +23 -0
- package/dist/useCursorList-5c1b57aa.js +62 -0
- package/dist/useCursorList-e1cb41e7.cjs +1 -0
- package/dist/useElementWidth-b36a7ce9.js +40 -0
- package/dist/useElementWidth-b3e53f48.cjs +1 -0
- package/dist/useFileUpload-228dbc07.js +24 -0
- package/dist/useFileUpload-f47622bb.cjs +1 -0
- package/dist/useIsMobile-7b1f08cf.cjs +1 -0
- package/dist/useIsMobile-98fc0cf9.js +7 -0
- package/dist/useMediaQuery-1d87df02.cjs +1 -0
- package/dist/useMediaQuery-77a19b18.js +37 -0
- package/dist/useModal-6a5d870b.js +30 -0
- package/dist/useModal-aa6f4a57.cjs +1 -0
- package/dist/userList/OneUserInviteModal.vue.d.ts +2 -0
- package/dist/userList/OneUserList.vue.d.ts +2 -0
- package/dist/userList/OneUserListItem.vue.d.ts +2 -0
- package/dist/userList/index.cjs +1 -0
- package/dist/userList/index.d.ts +4 -0
- package/dist/userList/index.js +559 -0
- package/dist/utils/clipboard.d.ts +6 -0
- package/dist/utils/format.d.ts +17 -0
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +125 -0
- package/dist/utils/string.d.ts +25 -0
- package/dist/utils/versionChecker.d.ts +26 -0
- package/package.json +215 -24
- package/dist/ChevronRightIcon-7a2f0c20.cjs +0 -1
- package/dist/OneHelpMenu-c6e88d8f.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/OneMarkdown.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/SpinnerIcon-ccb6f3fc.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-0ea8fbf8.cjs +0 -1
- package/dist/SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js +0 -1
- package/dist/useModal-0c73777f.cjs +0 -1
- package/dist/useModal-7fe9444b.js +0 -194
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),V=require("./dropdown-5cb64ab7.cjs"),w=require("@floating-ui/dom"),D=require("@floating-ui/vue"),y=require("./OneAvatar.vue_vue_type_script_setup_true_lang-2d9f44f1.cjs"),B=require("./i18n/index.cjs"),N=require("./XMarkIcon-f94baa4c.cjs"),C=require("./ChevronDownIcon-6889ac87.cjs"),$=require("./ChevronUpIcon-64a673e1.cjs"),j=require("./ChevronRightIcon-2992cf0d.cjs"),O=require("./button/index.cjs"),A=require("./_plugin-vue_export-helper-f246444f.cjs"),q=["data-opened"],I={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},P={key:0,class:"text-sm text-secondary-content px-3 py-2 text-left"},F=e.defineComponent({__name:"OneDropdown",props:V.dropdownProps,emits:["open","close"],setup(h,{emit:u}){const c=e.ref(!1),d=e.ref(null),v=e.ref(null),s=e.ref(null),r=u,t=h,a=()=>{c.value=!c.value,c.value?r("open"):r("close")};let p=null;const f=()=>{t.trigger==="hover"&&(p&&(clearTimeout(p),p=null),c.value||(c.value=!0,r("open")))},i=()=>{t.trigger==="hover"&&(p=setTimeout(()=>{c.value&&(c.value=!1,r("close"))},100))};e.provide("OneDropdown",{onToggle:a});let m=null;function x(){!v.value||!s.value||w.computePosition(v.value,s.value,{placement:t.stick?t.stick:"bottom-start",strategy:"fixed",middleware:[w.offset(t.offset),D.flip(),w.shift({padding:8})]}).then(({x:o,y:l})=>{s.value&&Object.assign(s.value.style,{left:`${o}px`,top:`${l}px`,visibility:"visible"})})}e.watch(c,async o=>{t.appendBody&&(o?(await e.nextTick(),v.value&&s.value&&(s.value.style.visibility="hidden",x(),m=w.autoUpdate(v.value,s.value,x))):m&&(m(),m=null))}),e.onBeforeUnmount(()=>{m&&m()});const k=e.computed(()=>{var _;if(t.appendBody)return"";const o=(_=d.value)==null?void 0:_.getBoundingClientRect(),l=o?o.x<270:!1;return o&&o.top+270>window.innerHeight?"up"+(l?"-right":"-left"):"down"+(l?"-right":"-left")}),g=e.computed(()=>{const o=["absolute z-10 w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"];return k.value.startsWith("up")?o.push("bottom-1 mb-10"):k.value.startsWith("down")&&o.push("top-1 mt-10"),t.stick==="right"?o.push("right-0"):t.stick==="left"&&o.push("left-0"),o}),n=e.computed(()=>["fixed z-[10000] w-fit rounded-md bg-white","py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none","overflow-auto max-h-[540px] min-w-[150px] max-w-[540px]"]);return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"relative inline-block",ref_key:"containerRef",ref:d,"data-opened":c.value,onMouseenter:f,onMouseleave:i},[e.createElementVNode("div",{ref_key:"buttonRef",ref:v},[e.renderSlot(o.$slots,"button",e.normalizeProps(e.guardReactiveProps({onToggle:a,isExpanded:c.value})))],512),t.appendBody?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-[9999]",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:s,class:e.normalizeClass(["menu",n.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1",onMouseenter:f,onMouseleave:i},[o.title?(e.openBlock(),e.createElementBlock("div",I,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],34)):e.createCommentVNode("",!0)]),_:3})])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value&&o.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10",onClick:a})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["menu",g.value]),role:"menu","aria-orientation":"vertical",tabindex:"-1"},[o.title?(e.openBlock(),e.createElementBlock("div",P,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"menu",e.normalizeProps(e.guardReactiveProps({onToggle:a})))],2)):e.createCommentVNode("",!0)]),_:3})],64))],40,q))}}),b=e.defineComponent({__name:"OneDropdownItem",props:V.dropdownItemProps,emits:["click"],setup(h,{emit:u}){const c=u,d=h,v=e.inject("OneDropdown"),s=()=>{v!==void 0&&v.onToggle(),c("click")},r=e.computed(()=>{const t=[];return d.variant==="secondary"?t.push("text-secondary-content hover:bg-secondary-body-hover"):d.variant==="danger"?t.push("text-danger-content hover:bg-danger-10"):d.variant==="warning"?t.push("text-warning-content hover:bg-warning-10"):d.variant==="info"?t.push("text-info-content hover:bg-info-10"):t.push("hover:bg-secondary-body-hover"),t});return(t,a)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["px-3 py-1.5 flex items-center space-x-3 w-full whitespace-nowrap",r.value]),onClick:e.withModifiers(s,["prevent"])},[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0,class:"w-4 h-4"})):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(t.label),1)],2))}});function T(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9"})])}const H={user:{type:Object,required:!0},menu:{type:Array,default:()=>[]},iconSize:{type:String,default:"34"},app:{type:Object},onAccount:{type:Function},onLogout:{type:Function},t:{type:Function}},S={workspace:{type:Object,required:!1},workspaces:{type:Array},apps:{type:Array,required:!0},iconSize:{type:String,default:"24"},onChange:{type:Function},onApp:{type:Function},t:{type:Function}},R={help:{type:Object},helpSlug:{type:String},t:{type:Function}},U=["onClick"],W={class:"flex flex-col items-center pt-5 pb-2 h-full"},X={class:"flex flex-col px-10 py-1 mt-2 text-center"},G={class:"self-center text-base font-medium tracking-wide text-black"},J={class:"mt-1 text-xs leading-5 text-blue-500 font-light"},K={class:"text-left w-full mt-5 px-3"},Q={class:"-mb-2 flex-shrink-0 mt-auto pt-6 text-[8px] leading-3 text-gray-400"},Y=e.defineComponent({__name:"OneUserMenu",props:H,setup(h){const u=h,c=B.useOnebI18n(),d=e.computed(()=>u.t??c),v=e.computed(()=>{var t;return(t=u.menu)==null?void 0:t.map(a=>{let p={label:a.label};a.icon!=null&&(p={...p,icon:a.icon});const f=typeof a.click=="function"?a.click:()=>{};return{key:a.label,args:p,click:f}})}),s=()=>{typeof u.onAccount=="function"&&u.onAccount()},r=()=>{typeof u.onLogout=="function"&&u.onLogout()};return(t,a)=>(e.openBlock(),e.createBlock(F,{stick:"right"},{button:e.withCtx(({onToggle:p,isExpanded:f})=>{var i,m;return[e.createElementVNode("button",{onClick:p,class:e.normalizeClass(["p-1 rounded-full hover:bg-secondary-10",[f?"bg-secondary-25":""]])},[e.createVNode(y._sfc_main,{text:((i=t.user)==null?void 0:i.name)||"",size:t.iconSize,src:(m=t.user)==null?void 0:m.photo_url,rounded:!0},null,8,["text","size","src"])],10,U)]}),menu:e.withCtx(()=>{var p,f,i,m,x;return[e.createElementVNode("div",W,[e.createVNode(y._sfc_main,{text:((p=t.user)==null?void 0:p.name)||"",size:80,src:(f=t.user)==null?void 0:f.photo_url,rounded:!0,class:"mx-auto"},null,8,["text","src"]),e.createElementVNode("div",X,[e.createElementVNode("div",G,e.toDisplayString((i=t.user)==null?void 0:i.name),1),e.createElementVNode("div",J,e.toDisplayString((m=t.user)==null?void 0:m.email),1)]),typeof u.onAccount=="function"?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:s,class:"cursor-pointer justify-center px-8 py-2 mt-3 text-xs font-semibold tracking-wide leading-5 text-gray-600 border border-solid bg-neutral-100 border-slate-200 rounded-[50px] hover:bg-neutral-200"},e.toDisplayString(d.value("ui.layout.account")),1)):e.createCommentVNode("",!0),e.createElementVNode("div",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,k=>(e.openBlock(),e.createBlock(b,e.mergeProps({key:k.key},{ref_for:!0},k.args,{onClick:k.click}),null,16,["onClick"]))),128)),typeof t.onLogout=="function"?(e.openBlock(),e.createBlock(b,{key:0,icon:e.unref(T),label:d.value("ui.layout.logout"),class:"rounded py-3",onClick:r},null,8,["icon","label"])):e.createCommentVNode("",!0)]),a[0]||(a[0]=e.createElementVNode("div",{class:"space-y-2 text-center",style:{width:"240px"}},null,-1)),e.createElementVNode("div",Q,e.toDisplayString((x=t.app)==null?void 0:x.version),1)])]}),_:1}))}});function M(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"3.9",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"10.53",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"17.16",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"10.53",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"}),e.createElementVNode("rect",{width:"2.94",height:"2.94",x:"3.9",y:"17.16",fill:"currentColor","stroke-width":"1.8",rx:"1.1"})])}const Z=["data-opened"],ee={key:1,class:"absolute top-0 right-0 h-screen overflow-y-auto max-w-96 bg-white px-3 z-10"},te={class:"flex justify-between items-center pt-3 mb-3"},oe={class:"font-semibold text-xl px-3"},ne={class:"grid"},le={class:"rounded-lg m-3 border"},re={class:"space-x-2 flex items-center px-3 py-2",style:{width:"300px"}},se={class:"flex justify-between relative"},ce={class:"flex items-center justify-between w-full text-left text-sm font-semibold"},ae={key:0},ie={class:"text-xs font-semibold"},ue={class:"px-3 py-2"},de={class:"text-secondary-content text-left pb-1 text-xs uppercase"},pe={class:"overflow-auto max-h-full"},me={key:0,class:"space-y-2"},he=["onClick"],fe={class:"flex"},ve={class:"border border-secondary-stroke rounded-2xl w-14 h-14 md:w-14 md:h-14 flex items-center justify-center"},ke={class:"pl-2"},xe={class:"text-sm mt-1 font-semibold"},ge={class:"text9 mt-1"},_e={key:1,class:"mt-2 w-full bg-[#FAFAFA] hover:bg-secondary-10 p-2 rounded-lg mb-5 text-xs hidden"},ye=e.defineComponent({__name:"OneBrowserMenu",props:S,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.ref(!1),t=()=>{r.value=!r.value,r.value?c("open"):c("close")},a=e.ref(!1);e.computed(()=>a.value?$.render:C.render);const p=()=>{typeof d.onChange=="function"&&d.onChange()},f=i=>{typeof d.onApp=="function"&&d.onApp(i)};return(i,m)=>{var x,k,g;return e.openBlock(),e.createElementBlock("div",{"data-opened":r.value},[e.createElementVNode("button",{onClick:t,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":r.value}])},[e.createVNode(e.unref(M),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10",onClick:t})):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("div",oe,e.toDisplayString(s.value("ui.layout.workspaces")),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:t})]),e.createElementVNode("div",ne,[e.createElementVNode("div",le,[e.createElementVNode("div",re,[e.createElementVNode("div",se,[e.createVNode(y._sfc_main,{text:((x=i.workspace)==null?void 0:x.name)||"",src:(k=i.workspace)==null?void 0:k.photo_url,size:44,rounded:!1,class:"mx-auto"},null,8,["text","src"])]),e.createElementVNode("div",ce,e.toDisplayString((g=i.workspace)==null?void 0:g.name),1)]),a.value?(e.openBlock(),e.createElementBlock("div",ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.workspaces,n=>(e.openBlock(),e.createElementBlock("div",{key:n.name,class:"flex items-center space-x-3 border-t px-5 py-2 hover:bg-secondary-10"},[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:30,rounded:!1},null,8,["text","src"]),e.createElementVNode("span",ie,e.toDisplayString(n.name),1)]))),128))])):e.createCommentVNode("",!0),m[0]||(m[0]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",{onClick:p,class:"text-center py-2 cursor-pointer",style:{"font-size":"10px"}},e.toDisplayString(s.value("ui.layout.change_workspace")),1)])]),e.createElementVNode("div",ue,[e.createElementVNode("div",de,e.toDisplayString(s.value("ui.layout.apps")),1),e.createElementVNode("div",pe,[i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.apps,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,onClick:o=>f(n),class:"flex justify-between items-center rounded-lg hover:bg-secondary-10 p-2 bg-[#FAFAFA] cursor-pointer"},[e.createElementVNode("div",fe,[e.createElementVNode("div",ve,[e.createVNode(y._sfc_main,{text:n.name,src:n.photo_url,size:44,rounded:!1},null,8,["text","src"])]),e.createElementVNode("div",ke,[e.createElementVNode("p",xe,e.toDisplayString(n.name),1),e.createElementVNode("p",ge,e.toDisplayString(n==null?void 0:n.short),1)])]),e.createElementVNode("div",null,[e.createVNode(O.OneButton,{variant:"touch",icon:e.unref(j.render),onClick:o=>f(n)},null,8,["icon","onClick"])])],8,he))),128))])):e.createCommentVNode("",!0),i.apps&&i.apps.length?(e.openBlock(),e.createElementBlock("button",_e,e.toDisplayString(s.value("ui.layout.view_all")),1)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)],8,Z)}}});const we=A._export_sfc(ye,[["__scopeId","data-v-3675784e"]]);function E(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})])}function be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}),e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.91 11.672a.375.375 0 010 .656l-5.603 3.113a.375.375 0 01-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112z"})])}function z(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"})])}function L(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.625 9.75a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H8.25m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0H12m4.125 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 01.778-.332 48.294 48.294 0 005.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})])}function Be(h,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})])}const Ee=["data-opened"],Ve={key:1,class:"absolute top-0 right-0 h-screen max-w-96 bg-white px-3 z-10 flex flex-col"},Ne={class:"flex justify-between items-center pt-3 mb-3"},Ce={class:"font-semibold text-xl px-3"},$e={key:0,class:"grid grid-cols-3 bg-[#FAFAFA] rounded-xl text-[#525B66] mb-2"},Ae=["onClick"],Fe={class:"uppercase text-[8px]"},Se={class:"overflow-y-auto grid rounded-xl"},Me={class:"max-h-full bg-[#FAFAFA]"},ze={key:0,class:"space-y-2"},Le=["onClick"],De={class:"flex"},je={class:"pl-2"},Oe={class:"text-sm mt-1 font-semibold"},qe={class:"text-[10px] mt-1 text-[#979CA9]"},Ie={class:"mt-auto"},Pe={key:0},Te=["onClick"],He={class:"flex items-center space-x-3"},Re={class:"h-16"},Ue={key:0,class:"bg-[#FAFAFA] rounded-lg p-3"},We={class:"flex justify-between"},Xe=["onClick"],Ge={key:0,class:"tooltip-text min-w-[70px]"},Je={class:"flex justify-between mb-4"},Ke=["href"],Qe={class:"flex flex-nowrap items-center w-max h-[24px]"},Ye={class:"whitespace-nowrap overflow-hidden text-ellipsis text-left flex-shrink w-full text-[#525B66]"},Ze={class:"py-[8px] pl-0 pr-[8px]"},et=e.defineComponent({__name:"OneHelpMenu",props:R,emits:["open","close"],setup(h,{emit:u}){const c=u,d=h,v=B.useOnebI18n(),s=e.computed(()=>d.t??v),r=e.computed(()=>{const n=d.help??{};return{label:n.label??s.value("ui.help.title"),social:n.social??s.value("ui.help.social"),socialButt:n.socialButt??s.value("ui.help.social"),buttMore:n.buttMore??s.value("ui.help.more"),buttNoMore:n.buttNoMore??s.value("ui.help.hide"),helpButton:n.helpButton??[{name:s.value("ui.help.support"),link:"https://t.me/onebapp_bot",icon:L},{name:s.value("ui.help.reference"),link:d.helpSlug?`https://oneb.app/help/${d.helpSlug}`:"https://oneb.app/help",icon:E},{name:s.value("ui.help.leave_request"),link:"https://oneb.app/support",icon:Be}],helpList:n.helpList??[],video:n.video??[],socialList:n.socialList??[],termsOffer:n.termsOffer??[{name:s.value("ui.help.terms"),link:"https://oneb.app/terms-of-service"},{name:s.value("ui.help.offer"),link:"https://oneb.app/offer"}]}}),t=e.ref(!1),a=()=>{t.value=!t.value,t.value?c("open"):c("close")},p=e.computed(()=>k.value?$.render:C.render),f=e.ref(3),i=e.computed(()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;return f.value===n});e.computed(()=>(r.value.helpList||[]).slice(0,f.value));const m=()=>{var o;const n=((o=r.value.helpList)==null?void 0:o.length)||0;f.value=i.value?3:n},x=(n,o)=>{n&&o&&typeof o.openLink=="function"?o.openLink(o):n&&window.open(n,"_blank")},k=e.ref(!1),g=()=>{k.value=!k.value};return(n,o)=>(e.openBlock(),e.createElementBlock("div",{"data-opened":t.value},[e.createElementVNode("button",{onClick:a,class:e.normalizeClass(["sm:p-1 sm:w-[44px] sm:h-[44px] w-8 h-8 rounded-md hover:bg-secondary-10 flex",{"bg-secondary-10":t.value}])},[e.createVNode(e.unref(E),{class:"text-secondary-base w-full p-1 hover:text-blue-600 m-auto"})],2),t.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed top-0 left-0 w-screen h-screen z-10 bg-black/10 flex flex-col",onClick:a})):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Ne,[e.createElementVNode("div",Ce,e.toDisplayString(r.value.label),1),e.createVNode(e.unref(N.render),{class:"w-6 cursor-pointer",onClick:a})]),r.value.helpButton?(e.openBlock(),e.createElementBlock("div",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpButton,l=>(e.openBlock(),e.createElementBlock("button",{key:l.name,onClick:_=>x(l.link,l),class:"grid justify-center space-y-2 hover:bg-slate-100 p-3 rounded-xl hover:text-blue-500"},[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[16px] h-[16px] mx-auto"}))]),e.createElementVNode("span",Fe,e.toDisplayString(l.name),1)],8,Ae))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",Se,[e.createElementVNode("div",Me,[r.value.helpList&&r.value.helpList.length?(e.openBlock(),e.createElementBlock("div",ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.helpList,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,onClick:_=>x(l.link,l),class:"flex justify-between items-center rounded-lg hover:bg-slate-100 p-2 cursor-pointer hover:text-[#4089E0]"},[e.createElementVNode("div",De,[e.createElementVNode("div",je,[e.createElementVNode("p",Oe,e.toDisplayString(l.name),1),e.createElementVNode("p",qe,e.toDisplayString(l.category),1)])])],8,Le))),128))])):e.createCommentVNode("",!0)])]),r.value.helpList&&r.value.helpList.length<0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:m,class:"h-11 w-full bg-[#FAFAFA] hover:bg-slate-100 p-3 text-[#525B66] rounded-b-xl text-xs hover:text-[#4089E0] font-medium"},e.toDisplayString(i.value?r.value.buttNoMore:r.value.buttMore),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ie,[r.value.video?(e.openBlock(),e.createElementBlock("div",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.video,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-3 mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createVNode(e.unref(be),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(l.name),1)],8,Te))),128))])):e.createCommentVNode("",!0),r.value.socialList?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:g,class:"flex items-center justify-between mt-2 w-full bg-[#FAFAFA] hover:bg-slate-100 p-4 text-[#525B66] rounded-lg text-sm hover:text-[#4089E0] font-medium"},[e.createElementVNode("div",He,[e.createVNode(e.unref(z),{class:"w-6 h-6"}),e.createElementVNode("span",null,e.toDisplayString(r.value.socialButt),1)]),e.createVNode(e.unref(p),{class:"w-4 h-4"})])):e.createCommentVNode("",!0),e.createElementVNode("div",Re,[k.value?(e.openBlock(),e.createElementBlock("div",Ue,[e.createElementVNode("div",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.socialList,l=>(e.openBlock(),e.createElementBlock("button",{key:l.id,onClick:_=>x(l.link,l),class:"flex items-center space-x-2 p-2 rounded-lg hover:bg-slate-100 hover:text-blue-500 tooltip"},[e.createElementVNode("div",null,[l.name?(e.openBlock(),e.createElementBlock("div",Ge,e.toDisplayString(l.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l==null?void 0:l.icon),{class:"w-[24px] h-[24px] mx-auto"}))])],8,Xe))),128))])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.termsOffer,l=>(e.openBlock(),e.createElementBlock("a",{key:l.name,target:"_blank",href:l.link,class:"ml-2 flex items-center rounded-lg text-xs hover:underline font-extralight cursor-pointer"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",Ye,[e.createElementVNode("span",Ze,e.toDisplayString(l.name),1)])])],8,Ke))),128))])])])):e.createCommentVNode("",!0)],8,Ee))}});const tt=A._export_sfc(et,[["__scopeId","data-v-56eccaba"]]);exports.OneBrowserMenu=we;exports.OneHelpMenu=tt;exports._sfc_main=F;exports._sfc_main$1=b;exports._sfc_main$2=Y;exports.browserMenuProps=S;exports.render=M;exports.render$1=z;exports.render$2=L;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),r=require("vue-markdown-render"),t={class:"markdown-view prose-sm"},o=e.defineComponent({__name:"OneMarkdown",props:{text:String},setup(n){return(c,s)=>(e.openBlock(),e.createElementBlock("div",t,[e.createVNode(e.unref(r),{source:n.text||""},null,8,["source"])]))}});exports._sfc_main=o;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineComponent as o, openBlock as r, createElementBlock as t, createVNode as n, unref as c } from "vue";
|
|
2
|
+
import s from "vue-markdown-render";
|
|
3
|
+
const a = { class: "markdown-view prose-sm" }, u = /* @__PURE__ */ o({
|
|
4
|
+
__name: "OneMarkdown",
|
|
5
|
+
props: {
|
|
6
|
+
text: String
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
return (m, p) => (r(), t("div", a, [
|
|
10
|
+
n(c(s), {
|
|
11
|
+
source: e.text || ""
|
|
12
|
+
}, null, 8, ["source"])
|
|
13
|
+
]));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
u as _
|
|
18
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { defineComponent as z, computed as d, watch as B, nextTick as _, ref as b, openBlock as p, createElementBlock as x, normalizeClass as a, createElementVNode as s, normalizeStyle as $, toDisplayString as h, renderSlot as i, createTextVNode as T, createCommentVNode as v } from "vue";
|
|
2
|
+
import { u as W } from "./useIsMobile-98fc0cf9.js";
|
|
3
|
+
import { _ as j } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const q = {
|
|
5
|
+
useModal: {
|
|
6
|
+
required: !0,
|
|
7
|
+
type: Object
|
|
8
|
+
},
|
|
9
|
+
title: {
|
|
10
|
+
required: !1,
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
subtitle: {
|
|
14
|
+
required: !1,
|
|
15
|
+
type: String,
|
|
16
|
+
default: ""
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "medium"
|
|
21
|
+
},
|
|
22
|
+
onClose: {
|
|
23
|
+
type: Function
|
|
24
|
+
},
|
|
25
|
+
classModal: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* Bottom-sheet mode: true — always, 'mobile' — only below the md breakpoint
|
|
31
|
+
* (ported from the finance/vizor local modal forks). classModal is the
|
|
32
|
+
* legacy always-on alias.
|
|
33
|
+
*/
|
|
34
|
+
sheet: {
|
|
35
|
+
type: [Boolean, String],
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
titleCenter: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
classTitle: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ""
|
|
45
|
+
},
|
|
46
|
+
canClose: {
|
|
47
|
+
type: Function,
|
|
48
|
+
default: () => !0
|
|
49
|
+
},
|
|
50
|
+
customWidth: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ""
|
|
53
|
+
}
|
|
54
|
+
}, D = {
|
|
55
|
+
"3xs": ["max-w-xs"],
|
|
56
|
+
xs: ["max-w-sm"],
|
|
57
|
+
sm: ["max-w-md"],
|
|
58
|
+
small: ["max-w-lg"],
|
|
59
|
+
md: ["max-w-xl"],
|
|
60
|
+
medium: ["max-w-xl"],
|
|
61
|
+
large: ["max-w-2xl"],
|
|
62
|
+
xl: ["max-w-3xl"],
|
|
63
|
+
"2xl": ["max-w-4xl"],
|
|
64
|
+
"3xl": ["max-w-4xl"],
|
|
65
|
+
"4xl": ["max-w-5xl"],
|
|
66
|
+
"5xl": ["max-w-5xl"],
|
|
67
|
+
"7xl": ["max-w-7xl"]
|
|
68
|
+
}, L = (c = "medium") => {
|
|
69
|
+
const r = [];
|
|
70
|
+
return r.push(...D[c] ?? []), r;
|
|
71
|
+
}, N = { class: "relative bg-white rounded-lg shadow h-full" }, V = /* @__PURE__ */ z({
|
|
72
|
+
__name: "OneModal",
|
|
73
|
+
props: q,
|
|
74
|
+
emits: ["isOpen", "closed"],
|
|
75
|
+
setup(c, { expose: r, emit: y }) {
|
|
76
|
+
const t = c, m = y, w = d(() => {
|
|
77
|
+
var l, n;
|
|
78
|
+
const e = t.useModal;
|
|
79
|
+
return ((l = e == null ? void 0 : e.isOpened) == null ? void 0 : l.value) ?? ((n = e == null ? void 0 : e.isOpen) == null ? void 0 : n.value) ?? !1;
|
|
80
|
+
}), C = W(), g = d(
|
|
81
|
+
() => t.classModal || t.sheet === !0 || t.sheet === "mobile" && C.value
|
|
82
|
+
);
|
|
83
|
+
B(w, (e) => {
|
|
84
|
+
e && _(() => {
|
|
85
|
+
var l;
|
|
86
|
+
return (l = o.value) == null ? void 0 : l.focus();
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
const M = d(() => L(t.size)), k = d(() => t.customWidth ? { width: t.customWidth } : {}), o = b(null), f = b(!1);
|
|
90
|
+
function O(e) {
|
|
91
|
+
f.value = !1, o.value && !o.value.contains(e.target) && (f.value = !0);
|
|
92
|
+
}
|
|
93
|
+
function S(e) {
|
|
94
|
+
f.value && o.value && !o.value.contains(e.target) && u();
|
|
95
|
+
}
|
|
96
|
+
const u = () => {
|
|
97
|
+
var l, n;
|
|
98
|
+
if (t.canClose && !t.canClose())
|
|
99
|
+
return;
|
|
100
|
+
const e = t.useModal;
|
|
101
|
+
(l = e == null ? void 0 : e.close) == null || l.call(e), (n = t.onClose) == null || n.call(t), m("closed"), m("isOpen");
|
|
102
|
+
};
|
|
103
|
+
return r({
|
|
104
|
+
open: () => {
|
|
105
|
+
var l;
|
|
106
|
+
const e = t.useModal;
|
|
107
|
+
(l = e == null ? void 0 : e.open) == null || l.call(e), m("isOpen");
|
|
108
|
+
},
|
|
109
|
+
close: u
|
|
110
|
+
}), (e, l) => w.value ? (p(), x("div", {
|
|
111
|
+
key: 0,
|
|
112
|
+
tabindex: "-1",
|
|
113
|
+
onMousedown: O,
|
|
114
|
+
onMouseup: S,
|
|
115
|
+
class: a(["modal backdrop !m-0", { "modal-mobile": g.value }])
|
|
116
|
+
}, [
|
|
117
|
+
s("div", {
|
|
118
|
+
class: a([
|
|
119
|
+
"relative w-full max-h-full",
|
|
120
|
+
M.value,
|
|
121
|
+
{ "fixed bottom-0 left-0 right-0 w-full bg-white rounded-t-xl mobile-modal": g.value }
|
|
122
|
+
]),
|
|
123
|
+
style: $(k.value),
|
|
124
|
+
ref_key: "modalContent",
|
|
125
|
+
ref: o,
|
|
126
|
+
role: "dialog",
|
|
127
|
+
"aria-modal": "true",
|
|
128
|
+
tabindex: "-1"
|
|
129
|
+
}, [
|
|
130
|
+
s("div", N, [
|
|
131
|
+
e.title ? (p(), x("div", {
|
|
132
|
+
key: 0,
|
|
133
|
+
class: a([
|
|
134
|
+
e.titleCenter ? "grid grid-cols-4" : "flex items-start justify-between",
|
|
135
|
+
"p-3 border-b rounded-t",
|
|
136
|
+
e.classTitle
|
|
137
|
+
])
|
|
138
|
+
}, [
|
|
139
|
+
s("div", {
|
|
140
|
+
class: a(["flex flex-col min-w-0", e.titleCenter ? "col-span-2 col-start-2 items-center" : ""])
|
|
141
|
+
}, [
|
|
142
|
+
s("h3", {
|
|
143
|
+
class: a(["text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis max-w-full", e.titleCenter ? "text-center" : ""])
|
|
144
|
+
}, h(e.title), 3),
|
|
145
|
+
e.$slots.subtitle || e.subtitle ? (p(), x("div", {
|
|
146
|
+
key: 0,
|
|
147
|
+
class: a(["text-sm text-gray-500 mt-0.5 max-w-full", e.titleCenter ? "text-center" : ""])
|
|
148
|
+
}, [
|
|
149
|
+
i(e.$slots, "subtitle", {}, () => [
|
|
150
|
+
T(h(e.subtitle), 1)
|
|
151
|
+
], !0)
|
|
152
|
+
], 2)) : v("", !0)
|
|
153
|
+
], 2),
|
|
154
|
+
s("button", {
|
|
155
|
+
type: "button",
|
|
156
|
+
class: "text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center",
|
|
157
|
+
onClick: u
|
|
158
|
+
}, [...l[0] || (l[0] = [
|
|
159
|
+
s("svg", {
|
|
160
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
161
|
+
fill: "none",
|
|
162
|
+
viewBox: "0 0 24 24",
|
|
163
|
+
"stroke-width": "1.8",
|
|
164
|
+
stroke: "currentColor",
|
|
165
|
+
"aria-hidden": "true",
|
|
166
|
+
class: "w-5 h-5"
|
|
167
|
+
}, [
|
|
168
|
+
s("path", {
|
|
169
|
+
"stroke-linecap": "round",
|
|
170
|
+
"stroke-linejoin": "round",
|
|
171
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
172
|
+
})
|
|
173
|
+
], -1)
|
|
174
|
+
])])
|
|
175
|
+
], 2)) : v("", !0),
|
|
176
|
+
i(e.$slots, "header", {}, void 0, !0),
|
|
177
|
+
i(e.$slots, "body", {}, void 0, !0),
|
|
178
|
+
i(e.$slots, "default", {}, void 0, !0),
|
|
179
|
+
i(e.$slots, "footer", { close: u }, void 0, !0)
|
|
180
|
+
])
|
|
181
|
+
], 6)
|
|
182
|
+
], 34)) : v("", !0);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
const P = /* @__PURE__ */ j(V, [["__scopeId", "data-v-9864fbb1"]]);
|
|
186
|
+
export {
|
|
187
|
+
P as O,
|
|
188
|
+
q as m
|
|
189
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),h=require("./useIsMobile-7b1f08cf.cjs"),y=require("./_plugin-vue_export-helper-f246444f.cjs"),p={useModal:{required:!0,type:Object},title:{required:!1,type:String},subtitle:{required:!1,type:String,default:""},size:{type:String,default:"medium"},onClose:{type:Function},classModal:{type:Boolean,default:!1},sheet:{type:[Boolean,String],default:!1},titleCenter:{type:Boolean,default:!1},classTitle:{type:String,default:""},canClose:{type:Function,default:()=>!0},customWidth:{type:String,default:""}},C={"3xs":["max-w-xs"],xs:["max-w-sm"],sm:["max-w-md"],small:["max-w-lg"],md:["max-w-xl"],medium:["max-w-xl"],large:["max-w-2xl"],xl:["max-w-3xl"],"2xl":["max-w-4xl"],"3xl":["max-w-4xl"],"4xl":["max-w-5xl"],"5xl":["max-w-5xl"],"7xl":["max-w-7xl"]},M=(i="medium")=>{const a=[];return a.push(...C[i]??[]),a},k={class:"relative bg-white rounded-lg shadow h-full"},S=t.defineComponent({__name:"OneModal",props:p,emits:["isOpen","closed"],setup(i,{expose:a,emit:f}){const l=i,u=f,c=t.computed(()=>{var s,n;const e=l.useModal;return((s=e==null?void 0:e.isOpened)==null?void 0:s.value)??((n=e==null?void 0:e.isOpen)==null?void 0:n.value)??!1}),x=h.useIsMobile(),m=t.computed(()=>l.classModal||l.sheet===!0||l.sheet==="mobile"&&x.value);t.watch(c,e=>{e&&t.nextTick(()=>{var s;return(s=o.value)==null?void 0:s.focus()})});const v=t.computed(()=>M(l.size)),w=t.computed(()=>l.customWidth?{width:l.customWidth}:{}),o=t.ref(null),d=t.ref(!1);function g(e){d.value=!1,o.value&&!o.value.contains(e.target)&&(d.value=!0)}function b(e){d.value&&o.value&&!o.value.contains(e.target)&&r()}const r=()=>{var s,n;if(l.canClose&&!l.canClose())return;const e=l.useModal;(s=e==null?void 0:e.close)==null||s.call(e),(n=l.onClose)==null||n.call(l),u("closed"),u("isOpen")};return a({open:()=>{var s;const e=l.useModal;(s=e==null?void 0:e.open)==null||s.call(e),u("isOpen")},close:r}),(e,s)=>c.value?(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:"-1",onMousedown:g,onMouseup:b,class:t.normalizeClass(["modal backdrop !m-0",{"modal-mobile":m.value}])},[t.createElementVNode("div",{class:t.normalizeClass(["relative w-full max-h-full",v.value,{"fixed bottom-0 left-0 right-0 w-full bg-white rounded-t-xl mobile-modal":m.value}]),style:t.normalizeStyle(w.value),ref_key:"modalContent",ref:o,role:"dialog","aria-modal":"true",tabindex:"-1"},[t.createElementVNode("div",k,[e.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([e.titleCenter?"grid grid-cols-4":"flex items-start justify-between","p-3 border-b rounded-t",e.classTitle])},[t.createElementVNode("div",{class:t.normalizeClass(["flex flex-col min-w-0",e.titleCenter?"col-span-2 col-start-2 items-center":""])},[t.createElementVNode("h3",{class:t.normalizeClass(["text-xl font-semibold text-gray-900 whitespace-nowrap overflow-hidden text-ellipsis max-w-full",e.titleCenter?"text-center":""])},t.toDisplayString(e.title),3),e.$slots.subtitle||e.subtitle?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["text-sm text-gray-500 mt-0.5 max-w-full",e.titleCenter?"text-center":""])},[t.renderSlot(e.$slots,"subtitle",{},()=>[t.createTextVNode(t.toDisplayString(e.subtitle),1)],!0)],2)):t.createCommentVNode("",!0)],2),t.createElementVNode("button",{type:"button",class:"text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center",onClick:r},[...s[0]||(s[0]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.8",stroke:"currentColor","aria-hidden":"true",class:"w-5 h-5"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])],2)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"header",{},void 0,!0),t.renderSlot(e.$slots,"body",{},void 0,!0),t.renderSlot(e.$slots,"default",{},void 0,!0),t.renderSlot(e.$slots,"footer",{close:r},void 0,!0)])],6)],34)):t.createCommentVNode("",!0)}});const V=y._export_sfc(S,[["__scopeId","data-v-9864fbb1"]]);exports.OneModal=V;exports.modalProps=p;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineComponent as e, openBlock as i, createElementBlock as n, renderSlot as p } from "vue";
|
|
2
|
+
const l = ["tooltip", "position"], a = /* @__PURE__ */ e({
|
|
3
|
+
__name: "OneTooltip",
|
|
4
|
+
props: {
|
|
5
|
+
tooltipText: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "Tooltip text"
|
|
8
|
+
},
|
|
9
|
+
position: {
|
|
10
|
+
default: "top",
|
|
11
|
+
type: String
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(t) {
|
|
15
|
+
return (o, r) => (i(), n("div", {
|
|
16
|
+
tooltip: t.tooltipText,
|
|
17
|
+
position: t.position
|
|
18
|
+
}, [
|
|
19
|
+
p(o.$slots, "default")
|
|
20
|
+
], 8, l));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
a as _
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),i=["tooltip","position"],n=t.defineComponent({__name:"OneTooltip",props:{tooltipText:{type:String,default:"Tooltip text"},position:{default:"top",type:String}},setup(o){return(e,p)=>(t.openBlock(),t.createElementBlock("div",{tooltip:o.tooltipText,position:o.position},[t.renderSlot(e.$slots,"default")],8,i))}});exports._sfc_main=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),t=require("./_plugin-vue_export-helper-f246444f.cjs");const o={},i={class:"spinner",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{animation:"one-sp-ico-rot 2.7s linear infinite"}};function r(c,n){return e.openBlock(),e.createElementBlock("svg",i,[...n[0]||(n[0]=[e.createElementVNode("circle",{style:{"stroke-linecap":"round",animation:"one-sp-ico-dash 1.7s ease-in-out infinite"},class:"opacity-75",cx:"12",cy:"12",r:"8",fill:"none",stroke:"currentColor","stroke-width":"2"},null,-1)])])}const s=t._export_sfc(o,[["render",r]]);exports.SpinnerIcon=s;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { openBlock as n, createElementBlock as o, createElementVNode as t } from "vue";
|
|
2
|
-
import "./
|
|
3
|
-
|
|
4
|
-
const i = {}, s = {
|
|
2
|
+
import { _ as s } from "./_plugin-vue_export-helper-dad06003.js";
|
|
3
|
+
const i = {}, r = {
|
|
5
4
|
class: "spinner",
|
|
6
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
6
|
viewBox: "0 0 24 24",
|
|
8
7
|
style: { animation: "one-sp-ico-rot 2.7s linear infinite" }
|
|
9
8
|
};
|
|
10
9
|
function c(l, e) {
|
|
11
|
-
return n(), o("svg",
|
|
10
|
+
return n(), o("svg", r, [...e[0] || (e[0] = [
|
|
12
11
|
t("circle", {
|
|
13
12
|
style: { "stroke-linecap": "round", animation: "one-sp-ico-dash 1.7s ease-in-out infinite" },
|
|
14
13
|
class: "opacity-75",
|
|
@@ -21,7 +20,7 @@ function c(l, e) {
|
|
|
21
20
|
}, null, -1)
|
|
22
21
|
])]);
|
|
23
22
|
}
|
|
24
|
-
const
|
|
23
|
+
const p = /* @__PURE__ */ s(i, [["render", c]]);
|
|
25
24
|
export {
|
|
26
|
-
|
|
25
|
+
p as S
|
|
27
26
|
};
|
package/dist/button/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../SpinnerIcon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("../SpinnerIcon-01be39fe.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");const y={variant:{type:String,default:"primary"},size:{type:String,default:"md"},label:{type:String},labelClass:{type:String,default:""},icon:{type:[Function,Object]},isLoading:{type:Boolean},isSubmit:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconClass:{type:[String,Array]},iconAfter:{type:[Function,Object,String]}},v=["relative inline-flex","border","items-center justify-center","font-semibold whitespace-nowrap","disabled:opacity-30 disabled:cursor-default","focus:outline-none focus:ring-2","transition-colors duration-200"],h={xs:["h-6 px-2.5 text-xs"],sm:["px-2 py-1 text-sm"],md:["h-[40px] px-4 text-sm"],lg:["h-[52px] px-5 text-base"]},f={primary:["rounded-10 border-transparent bg-primary-base disabled:bg-[#979CA9] text-sm text-white hover:bg-primary-hover active:bg-primary-active focus:ring-primary-glow"],secondary:["rounded-10 border-primary-stroke bg-white text-secondary-base text-sm hover:bg-light-body-active active:bg-light-body focus:ring-primary-glow"],info:["rounded-10 border-transparent bg-info-base disabled:bg-[#979CA9] text-white text-sm hover:bg-info-hover active:bg-info-active focus:ring-info-glow"],success:["rounded-10 border-transparent bg-success-base disabled:bg-[#979CA9] text-white text-sm hover:bg-success-hover active:bg-success-active focus:ring-success-glow"],warning:["rounded-10 border-transparent bg-warning-base disabled:bg-[#979CA9] text-white text-sm hover:bg-warning-hover active:bg-warning-active focus:ring-warning-glow"],danger:["rounded-10 border-transparent bg-danger-base disabled:bg-[#979CA9] text-white text-sm hover:bg-danger-hover active:bg-danger-active focus:ring-danger-glow"],tertiary:["rounded-10 border-transparent bg-secondary-body text-primary-base text-sm hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],touch:["rounded-full border-transparent text-secondary-base hover:bg-light-body-active active:bg-light-body p-2 text-sm focus:ring-primary-glow"],link:["rounded-md border-transparent items-center text-info-base hover:text-info-hover text-sm"],none:["rounded-md border-transparent text-secondary-base"],mini:["rounded-full border-transparent bg-[#FAFAFA] h-8 px-2 gap-2 text-xs hover:text-success-base focus:ring-primary-glow"],edit:["rounded-md border-transparent bg-tertiary-base text-primary-base text-2xs h-6 px-1.5 hover:border-primary-base active:bg-primary-body-active focus:ring-primary-glow"],send:["rounded-full border-transparent bg-primary-base text-white hover:bg-primary-hover active:bg-primary-active p-[9px] focus:ring-primary-glow"]},x=(a="primary",l="md")=>{const r=[];return r.push(...v),r.push(...f[a]??[]),a!=="touch"&&a!=="mini"&&a!=="edit"&&a!=="send"&&r.push(...h[l]??[]),l==="xs"?r.map(c=>c.replace("rounded-10","rounded-md").replace("font-semibold","font-medium")):r},C=["disabled","title","type"],w=e.defineComponent({__name:"OneButton",props:y,emits:["click"],setup(a,{emit:l}){const r=e.useSlots(),c=l,t=a,d=()=>{c("click")},n=e.computed(()=>t.icon),i=e.computed(()=>t.iconAfter),p=e.computed(()=>{const s=x(t.variant,t.size);return t.variant==="edit"?s.push("gap-1.5"):s.push("gap-[10px]"),t.variant==="touch"&&t.active&&s.push("bg-primary-body-active"),s}),b=e.computed(()=>t.disabled||t.isLoading),g=e.computed(()=>(t.label&&t.label.length>0||!!r.default)&&t.variant!=="touch"&&t.variant!=="send"),m=e.computed(()=>{const s=["inline-block text-ellipsis overflow-hidden"];return t.labelClass!=null&&s.push(t.labelClass),s}),o=e.computed(()=>{const s=[];return t.variant==="edit"?s.push("w-3.5 h-3.5"):t.variant==="send"?s.push("w-5 h-5"):t.size==="xs"?s.push("w-3.5 h-3.5"):t.size==="sm"?s.push("w-3 h-3"):t.size==="lg"?s.push("w-5 h-5"):s.push("w-4 h-4"),typeof t.iconClass=="string"?s.push(t.iconClass):t.iconClass instanceof Array&&s.push(...t.iconClass),s});return(s,k)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(p.value),disabled:b.value,title:s.label,type:s.isSubmit?"submit":"button",onClick:e.withModifiers(d,["stop"])},[n.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(u.SpinnerIcon,{key:0,class:e.normalizeClass(o.value)},null,8,["class"])):typeof n.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(o.value)},e.toDisplayString(n.value),3)):n.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value),{key:2,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(m.value)},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(s.label),1)])],2)):e.createCommentVNode("",!0),i.value!=null&&s.isLoading?(e.openBlock(),e.createBlock(u.SpinnerIcon,{key:4,class:e.normalizeClass(o.value)},null,8,["class"])):typeof i.value=="string"?(e.openBlock(),e.createElementBlock("span",{key:5,class:e.normalizeClass(o.value)},e.toDisplayString(i.value),3)):i.value!=null?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{key:6,class:e.normalizeClass(o.value)},null,8,["class"])):e.createCommentVNode("",!0)],10,C))}});exports.OneButton=w;
|
package/dist/button/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as OneButton } from './OneButton.vue';
|
|
2
|
-
export type { ButtonProps } from './button';
|
|
2
|
+
export type { ButtonProps, ButtonVariantType, ButtonSizeType, ButtonIconType } from './button';
|
package/dist/button/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent as k, useSlots as B, computed as o, openBlock as s, createElementBlock as u, normalizeClass as a, withModifiers as S, createBlock as p, toDisplayString as g, resolveDynamicComponent as v, createCommentVNode as m, renderSlot as A, createTextVNode as L } from "vue";
|
|
2
|
-
import { S as y } from "../SpinnerIcon-
|
|
3
|
-
import "../SpinnerIcon.vue_vue_type_style_index_0_lang-4ed993c7.js";
|
|
2
|
+
import { S as y } from "../SpinnerIcon-516264ba.js";
|
|
4
3
|
import "../_plugin-vue_export-helper-dad06003.js";
|
|
5
4
|
const z = {
|
|
6
5
|
variant: {
|
|
@@ -96,7 +95,7 @@ const z = {
|
|
|
96
95
|
return n.push(...F), n.push(...O[r] ?? []), r !== "touch" && r !== "mini" && r !== "edit" && r !== "send" && n.push(...I[d] ?? []), d === "xs" ? n.map(
|
|
97
96
|
(b) => b.replace("rounded-10", "rounded-md").replace("font-semibold", "font-medium")
|
|
98
97
|
) : n;
|
|
99
|
-
}, D = ["disabled", "title", "type"],
|
|
98
|
+
}, D = ["disabled", "title", "type"], M = /* @__PURE__ */ k({
|
|
100
99
|
__name: "OneButton",
|
|
101
100
|
props: z,
|
|
102
101
|
emits: ["click"],
|
|
@@ -154,5 +153,5 @@ const z = {
|
|
|
154
153
|
}
|
|
155
154
|
});
|
|
156
155
|
export {
|
|
157
|
-
|
|
156
|
+
M as OneButton
|
|
158
157
|
};
|
|
@@ -12,6 +12,11 @@ export declare const checkboxProps: {
|
|
|
12
12
|
type: PropType<CheckboxTextPositionType>;
|
|
13
13
|
default: string;
|
|
14
14
|
};
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: PropType<boolean>;
|
|
17
|
+
default: any;
|
|
18
|
+
};
|
|
19
|
+
/** @deprecated use v-model (modelValue) instead */
|
|
15
20
|
isChecked: {
|
|
16
21
|
type: PropType<boolean>;
|
|
17
22
|
default: boolean;
|
package/dist/checkbox/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("../SpinnerIcon-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("../SpinnerIcon-01be39fe.cjs"),m=require("../_plugin-vue_export-helper-f246444f.cjs"),k={color:{type:String,default:"blue"},textPosition:{type:String,default:"left"},modelValue:{type:Boolean,default:void 0},isChecked:{type:Boolean,default:!0},isLoading:{required:!1,type:Boolean,default:!1},disabled:{required:!1,type:Boolean,default:!1},textOn:{type:String,default:""},textOff:{type:String,default:""},textClass:{type:[String,Array]}},f=["checked"],h={key:0,class:"mr-2 text-gray-600 text-sm font-medium"},y={key:1,class:"checkmark-tick absolute inset-0 w-full h-full",viewBox:"0 0 24 24",fill:"none",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},g={key:1,class:"ml-2 text-gray-600 text-sm font-medium"},x=e.defineComponent({__name:"OneCheckbox",props:k,emits:["change","update:modelValue"],setup(c,{emit:s}){const t=c,r=s,a=e.computed(()=>t.modelValue??t.isChecked),o=e.ref(a.value);e.watch(a,n=>{o.value=n});const i=e.computed(()=>{if(o.value)switch(t.color){case"green":return"#86c94c";case"blue":return"#2196f3";case"red":return"#f44336";case"yellow":return"#ffeb3b";default:return"#86c94c"}else return"#fefefe"}),d=e.computed(()=>t.disabled),u=n=>{const l=n.target;o.value=l.checked,r("update:modelValue",l.checked),r("change",l.checked)};return(n,l)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass([[d.value?"disabled opacity-50 pointer-events-none":""],"checkbox inline-flex items-center cursor-pointer mb-3 text-lg"])},[e.createElementVNode("input",{type:"checkbox",checked:o.value,onChange:u,class:"hidden"},null,40,f),t.textPosition==="left"?(e.openBlock(),e.createElementBlock("span",h,e.toDisplayString(o.value?t.textOn:t.textOff),1)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:"checkmark h-5 w-5 flex-shrink-0 border border-gray-300 rounded transition-all duration-300 relative hover:border-2 hover:border-gray-500",style:e.normalizeStyle({backgroundColor:i.value})},[e.createElementVNode("div",null,[n.isLoading?(e.openBlock(),e.createBlock(p.SpinnerIcon,{key:0,class:"absolute w-3 h-3 text-black left-1/2 top-1/2 -ml-1.5 -mt-1.5"})):!n.isLoading&&o.value?(e.openBlock(),e.createElementBlock("svg",y,[...l[0]||(l[0]=[e.createElementVNode("polyline",{points:"20 6 9 17 4 12"},null,-1)])])):e.createCommentVNode("",!0)])],4),t.textPosition==="right"?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(o.value?t.textOn:t.textOff),1)):e.createCommentVNode("",!0)],2))}});const b=m._export_sfc(x,[["__scopeId","data-v-754a6250"]]);exports.OneCheckbox=b;
|
package/dist/checkbox/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent as x, ref as
|
|
2
|
-
import { S as
|
|
3
|
-
import { _ as
|
|
4
|
-
|
|
5
|
-
const S = {
|
|
1
|
+
import { defineComponent as x, computed as s, ref as y, watch as g, openBlock as n, createElementBlock as a, normalizeClass as b, createElementVNode as r, toDisplayString as u, createCommentVNode as c, normalizeStyle as _, createBlock as v } from "vue";
|
|
2
|
+
import { S as C } from "../SpinnerIcon-516264ba.js";
|
|
3
|
+
import { _ as w } from "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const O = {
|
|
6
5
|
color: {
|
|
7
6
|
type: String,
|
|
8
7
|
default: "blue"
|
|
@@ -15,6 +14,11 @@ const S = {
|
|
|
15
14
|
type: String,
|
|
16
15
|
default: "left"
|
|
17
16
|
},
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
/** @deprecated use v-model (modelValue) instead */
|
|
18
22
|
isChecked: {
|
|
19
23
|
type: Boolean,
|
|
20
24
|
default: !0
|
|
@@ -49,10 +53,10 @@ const S = {
|
|
|
49
53
|
// iconClass: {
|
|
50
54
|
// type: [String, Array] as PropType<string|string[]>
|
|
51
55
|
// },
|
|
52
|
-
}, B = {
|
|
56
|
+
}, S = ["checked"], B = {
|
|
53
57
|
key: 0,
|
|
54
58
|
class: "mr-2 text-gray-600 text-sm font-medium"
|
|
55
|
-
},
|
|
59
|
+
}, V = {
|
|
56
60
|
key: 1,
|
|
57
61
|
class: "checkmark-tick absolute inset-0 w-full h-full",
|
|
58
62
|
viewBox: "0 0 24 24",
|
|
@@ -61,15 +65,19 @@ const S = {
|
|
|
61
65
|
"stroke-width": "3",
|
|
62
66
|
"stroke-linecap": "round",
|
|
63
67
|
"stroke-linejoin": "round"
|
|
64
|
-
},
|
|
68
|
+
}, P = {
|
|
65
69
|
key: 1,
|
|
66
70
|
class: "ml-2 text-gray-600 text-sm font-medium"
|
|
67
71
|
}, L = /* @__PURE__ */ x({
|
|
68
72
|
__name: "OneCheckbox",
|
|
69
|
-
props:
|
|
70
|
-
emits: ["change"],
|
|
71
|
-
setup(
|
|
72
|
-
const e =
|
|
73
|
+
props: O,
|
|
74
|
+
emits: ["change", "update:modelValue"],
|
|
75
|
+
setup(f, { emit: p }) {
|
|
76
|
+
const e = f, i = p, d = s(() => e.modelValue ?? e.isChecked), t = y(d.value);
|
|
77
|
+
g(d, (o) => {
|
|
78
|
+
t.value = o;
|
|
79
|
+
});
|
|
80
|
+
const h = s(() => {
|
|
73
81
|
if (t.value)
|
|
74
82
|
switch (e.color) {
|
|
75
83
|
case "green":
|
|
@@ -85,40 +93,38 @@ const S = {
|
|
|
85
93
|
}
|
|
86
94
|
else
|
|
87
95
|
return "#fefefe";
|
|
88
|
-
}), m =
|
|
89
|
-
const
|
|
90
|
-
t.value =
|
|
96
|
+
}), m = s(() => e.disabled), k = (o) => {
|
|
97
|
+
const l = o.target;
|
|
98
|
+
t.value = l.checked, i("update:modelValue", l.checked), i("change", l.checked);
|
|
91
99
|
};
|
|
92
|
-
return (
|
|
93
|
-
class:
|
|
100
|
+
return (o, l) => (n(), a("label", {
|
|
101
|
+
class: b([[m.value ? "disabled opacity-50 pointer-events-none" : ""], "checkbox inline-flex items-center cursor-pointer mb-3 text-lg"])
|
|
94
102
|
}, [
|
|
95
|
-
|
|
103
|
+
r("input", {
|
|
96
104
|
type: "checkbox",
|
|
97
|
-
|
|
98
|
-
onChange:
|
|
105
|
+
checked: t.value,
|
|
106
|
+
onChange: k,
|
|
99
107
|
class: "hidden"
|
|
100
|
-
}, null,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
e.textPosition === "left" ? (n(), r("span", B, c(t.value ? e.textOn : e.textOff), 1)) : a("", !0),
|
|
104
|
-
s("span", {
|
|
108
|
+
}, null, 40, S),
|
|
109
|
+
e.textPosition === "left" ? (n(), a("span", B, u(t.value ? e.textOn : e.textOff), 1)) : c("", !0),
|
|
110
|
+
r("span", {
|
|
105
111
|
class: "checkmark h-5 w-5 flex-shrink-0 border border-gray-300 rounded transition-all duration-300 relative hover:border-2 hover:border-gray-500",
|
|
106
|
-
style: _({ backgroundColor:
|
|
112
|
+
style: _({ backgroundColor: h.value })
|
|
107
113
|
}, [
|
|
108
|
-
|
|
109
|
-
|
|
114
|
+
r("div", null, [
|
|
115
|
+
o.isLoading ? (n(), v(C, {
|
|
110
116
|
key: 0,
|
|
111
117
|
class: "absolute w-3 h-3 text-black left-1/2 top-1/2 -ml-1.5 -mt-1.5"
|
|
112
|
-
})) : !
|
|
113
|
-
|
|
114
|
-
])])) :
|
|
118
|
+
})) : !o.isLoading && t.value ? (n(), a("svg", V, [...l[0] || (l[0] = [
|
|
119
|
+
r("polyline", { points: "20 6 9 17 4 12" }, null, -1)
|
|
120
|
+
])])) : c("", !0)
|
|
115
121
|
])
|
|
116
122
|
], 4),
|
|
117
|
-
e.textPosition === "right" ? (n(),
|
|
123
|
+
e.textPosition === "right" ? (n(), a("span", P, u(t.value ? e.textOn : e.textOff), 1)) : c("", !0)
|
|
118
124
|
], 2));
|
|
119
125
|
}
|
|
120
126
|
});
|
|
121
|
-
const
|
|
127
|
+
const E = /* @__PURE__ */ w(L, [["__scopeId", "data-v-754a6250"]]);
|
|
122
128
|
export {
|
|
123
|
-
|
|
129
|
+
E as OneCheckbox
|
|
124
130
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export declare const chipsProps: {
|
|
3
|
+
modelValue: {
|
|
4
|
+
type: PropType<Record<string, unknown>[]>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
labelKey: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
valueKey: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
/** Heading rendered before the chips. */
|
|
16
|
+
label: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
removable: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export type ChipsProps = ExtractPropTypes<typeof chipsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n={modelValue:{type:Array,required:!0},labelKey:{type:String,default:"name"},valueKey:{type:String,default:"id"},label:{type:String,default:""},removable:{type:Boolean,default:!0}},m={class:"flex items-center flex-wrap gap-1"},p={key:0,class:"font-medium mr-2"},u=["data-test","onClick"],c=e.defineComponent({__name:"OneChips",props:n,emits:["update:modelValue","remove"],setup(s,{emit:i}){const o=s,r=i,d=t=>{r("remove",t),r("update:modelValue",o.modelValue.filter(a=>String(a[o.valueKey])!==String(t[o.valueKey])))};return(t,a)=>(e.openBlock(),e.createElementBlock("div",m,[t.label?(e.openBlock(),e.createElementBlock("span",p,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.modelValue,l=>(e.openBlock(),e.createElementBlock("div",{key:String(l[t.valueKey]),class:"flex"},[e.createElementVNode("span",{class:e.normalizeClass(["bg-primary-base text-white text-sm px-2 py-1 rounded-l-md flex items-center",{"rounded-r-md":!t.removable}])},e.toDisplayString(l[t.labelKey]),3),t.removable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"text-xs text-white hover:text-red-300 px-2 bg-primary-base rounded-r-md","data-test":`chip-remove-${l[t.valueKey]}`,onClick:e.withModifiers(y=>d(l),["prevent","stop"])}," ✕ ",8,u)):e.createCommentVNode("",!0)]))),128)),e.renderSlot(t.$slots,"default")]))}});exports.OneChips=c;exports.chipsProps=n;
|