@oneb/ui-vue 0.3.31 → 0.4.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/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/InformationCircleIcon-2f6097a0.js +20 -0
- package/dist/InformationCircleIcon-d6b67d5d.cjs +1 -0
- package/dist/MagnifyingGlassIcon-adf871ba.cjs +1 -0
- package/dist/MagnifyingGlassIcon-ca213d3d.js +20 -0
- package/dist/{NoSymbolIcon-e58a9aee.js → NoSymbolIcon-b3470a26.js} +8 -25
- package/dist/{NoSymbolIcon-5d326416.cjs → NoSymbolIcon-e84375bb.cjs} +1 -1
- 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-6ec63535.cjs +1 -0
- package/dist/{OneHelpMenu-73817f8a.js → OneHelpMenu-d5182c78.js} +118 -213
- 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 +557 -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 +257 -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 +99 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +243 -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/infobox/index.cjs +1 -1
- package/dist/infobox/index.js +4 -3
- package/dist/label/index.cjs +1 -1
- package/dist/label/index.js +5 -5
- 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 +6 -1
- package/dist/layout/index.js +1057 -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 +102 -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/OneStageBadge.vue.d.ts +2 -0
- package/dist/stageBadge/index.cjs +1 -0
- package/dist/stageBadge/index.d.ts +3 -0
- package/dist/stageBadge/index.js +126 -0
- package/dist/stageBadge/stageBadge.d.ts +64 -0
- 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 -73
- 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 +221 -23
- 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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("@floating-ui/dom"),y={placement:{type:String,default:"bottom"},trigger:{type:String,default:"click"},offset:{type:Number,default:8},disabled:{type:Boolean,default:!1},closeDelayMs:{type:Number,default:150},contentClass:{type:String,default:""}},S=e.defineComponent({__name:"OnePopover",props:y,emits:["open","close"],setup(k,{expose:b,emit:h}){const s=k,f=h,r=e.ref(!1),n=e.ref(null),l=e.ref(null);let o=null,i;const d=()=>{!n.value||!l.value||c.computePosition(n.value,l.value,{placement:s.placement,strategy:"fixed",middleware:[c.offset(s.offset),c.flip(),c.shift({padding:8})]}).then(({x:t,y:g})=>{l.value&&Object.assign(l.value.style,{left:`${t}px`,top:`${g}px`})})};e.watch(r,t=>{t&&n.value&&l.value?(d(),o=c.autoUpdate(n.value,l.value,d),f("open")):(o==null||o(),o=null,t||f("close"))});const u=()=>{s.disabled||(r.value=!0)},a=()=>{r.value=!1},p=()=>r.value?a():u(),m=()=>{clearTimeout(i),i=setTimeout(a,s.closeDelayMs)},v=()=>clearTimeout(i),B=e.computed(()=>s.trigger==="hover"?{mouseenter:()=>{v(),u()},mouseleave:m}:{click:p}),P=e.computed(()=>s.trigger==="hover"?{mouseenter:v,mouseleave:m}:{});return e.onBeforeUnmount(()=>{clearTimeout(i),o==null||o()}),b({open:u,close:a,toggle:p}),(t,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({ref_key:"triggerRef",ref:n,class:"inline-block"},e.toHandlers(B.value,!0)),[e.renderSlot(t.$slots,"trigger",{isOpen:r.value,toggle:p})],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.trigger==="click"&&r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 z-[9998]","data-test":"popover-backdrop",onClick:a})):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",e.mergeProps({ref_key:"contentRef",ref:l,class:["fixed z-[9999] top-0 left-0 bg-white border border-primary-stroke rounded-10 shadow-lg",t.contentClass],role:"tooltip","data-test":"popover-content"},e.toHandlers(P.value,!0)),[e.renderSlot(t.$slots,"default",{close:a})],16),[[e.vShow,r.value]])]))],64))}});exports.OnePopover=S;exports.popoverProps=y;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineComponent as x, ref as u, watch as N, computed as y, onBeforeUnmount as R, openBlock as f, createElementBlock as k, Fragment as _, createElementVNode as b, mergeProps as h, toHandlers as C, renderSlot as w, createBlock as $, Teleport as D, createCommentVNode as z, withDirectives as E, vShow as L } from "vue";
|
|
2
|
+
import { autoUpdate as M, computePosition as V, offset as j, flip as F, shift as H } from "@floating-ui/dom";
|
|
3
|
+
const q = {
|
|
4
|
+
placement: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: "bottom"
|
|
7
|
+
},
|
|
8
|
+
trigger: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: "click"
|
|
11
|
+
},
|
|
12
|
+
offset: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 8
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
/** Hover-mode close delay, ms. */
|
|
21
|
+
closeDelayMs: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 150
|
|
24
|
+
},
|
|
25
|
+
contentClass: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ""
|
|
28
|
+
}
|
|
29
|
+
}, J = /* @__PURE__ */ x({
|
|
30
|
+
__name: "OnePopover",
|
|
31
|
+
props: q,
|
|
32
|
+
emits: ["open", "close"],
|
|
33
|
+
setup(T, { expose: B, emit: O }) {
|
|
34
|
+
const r = T, p = O, o = u(!1), s = u(null), l = u(null);
|
|
35
|
+
let t = null, a;
|
|
36
|
+
const m = () => {
|
|
37
|
+
!s.value || !l.value || V(s.value, l.value, {
|
|
38
|
+
placement: r.placement,
|
|
39
|
+
strategy: "fixed",
|
|
40
|
+
middleware: [j(r.offset), F(), H({ padding: 8 })]
|
|
41
|
+
}).then(({ x: e, y: g }) => {
|
|
42
|
+
l.value && Object.assign(l.value.style, { left: `${e}px`, top: `${g}px` });
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
N(o, (e) => {
|
|
46
|
+
e && s.value && l.value ? (m(), t = M(s.value, l.value, m), p("open")) : (t == null || t(), t = null, e || p("close"));
|
|
47
|
+
});
|
|
48
|
+
const i = () => {
|
|
49
|
+
r.disabled || (o.value = !0);
|
|
50
|
+
}, n = () => {
|
|
51
|
+
o.value = !1;
|
|
52
|
+
}, c = () => o.value ? n() : i(), d = () => {
|
|
53
|
+
clearTimeout(a), a = setTimeout(n, r.closeDelayMs);
|
|
54
|
+
}, v = () => clearTimeout(a), P = y(
|
|
55
|
+
() => r.trigger === "hover" ? {
|
|
56
|
+
mouseenter: () => {
|
|
57
|
+
v(), i();
|
|
58
|
+
},
|
|
59
|
+
mouseleave: d
|
|
60
|
+
} : { click: c }
|
|
61
|
+
), S = y(
|
|
62
|
+
() => r.trigger === "hover" ? { mouseenter: v, mouseleave: d } : {}
|
|
63
|
+
);
|
|
64
|
+
return R(() => {
|
|
65
|
+
clearTimeout(a), t == null || t();
|
|
66
|
+
}), B({ open: i, close: n, toggle: c }), (e, g) => (f(), k(_, null, [
|
|
67
|
+
b("div", h({
|
|
68
|
+
ref_key: "triggerRef",
|
|
69
|
+
ref: s,
|
|
70
|
+
class: "inline-block"
|
|
71
|
+
}, C(P.value, !0)), [
|
|
72
|
+
w(e.$slots, "trigger", {
|
|
73
|
+
isOpen: o.value,
|
|
74
|
+
toggle: c
|
|
75
|
+
})
|
|
76
|
+
], 16),
|
|
77
|
+
(f(), $(D, { to: "body" }, [
|
|
78
|
+
e.trigger === "click" && o.value ? (f(), k("div", {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: "fixed inset-0 z-[9998]",
|
|
81
|
+
"data-test": "popover-backdrop",
|
|
82
|
+
onClick: n
|
|
83
|
+
})) : z("", !0),
|
|
84
|
+
E(b("div", h({
|
|
85
|
+
ref_key: "contentRef",
|
|
86
|
+
ref: l,
|
|
87
|
+
class: ["fixed z-[9999] top-0 left-0 bg-white border border-primary-stroke rounded-10 shadow-lg", e.contentClass],
|
|
88
|
+
role: "tooltip",
|
|
89
|
+
"data-test": "popover-content"
|
|
90
|
+
}, C(S.value, !0)), [
|
|
91
|
+
w(e.$slots, "default", { close: n })
|
|
92
|
+
], 16), [
|
|
93
|
+
[L, o.value]
|
|
94
|
+
])
|
|
95
|
+
]))
|
|
96
|
+
], 64));
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export {
|
|
100
|
+
J as OnePopover,
|
|
101
|
+
q as popoverProps
|
|
102
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export type PopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right';
|
|
3
|
+
export type PopoverTrigger = 'click' | 'hover';
|
|
4
|
+
export declare const popoverProps: {
|
|
5
|
+
placement: {
|
|
6
|
+
type: PropType<PopoverPlacement>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
trigger: {
|
|
10
|
+
type: PropType<PopoverTrigger>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
offset: {
|
|
14
|
+
type: NumberConstructor;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
disabled: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** Hover-mode close delay, ms. */
|
|
22
|
+
closeDelayMs: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
contentClass: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type PopoverProps = ExtractPropTypes<typeof popoverProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("../tailwind.config.cjs"),u=require("../_plugin-vue_export-helper-f246444f.cjs"),c={primary:r.colors.primary.base,secondary:r.colors.secondary.base,success:r.colors.success.base,info:r.colors.info.base,warning:r.colors.warning.base,danger:r.colors.danger.base},t=o=>c[o]??o,i={value:{type:Number,required:!0},variant:{type:String,default:"linear"},color:{type:String,default:"primary"},size:{type:Number,default:20},strokeWidth:{type:Number,default:3}},p=["aria-valuenow"],d=["aria-valuenow"],v=e.defineComponent({__name:"OneProgress",props:i,setup(o){const l=o,s=e.computed(()=>Math.min(100,Math.max(0,l.value))),n=e.computed(()=>t(l.color));return(a,g)=>a.variant==="linear"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"h-2 w-full bg-primary-stroke rounded-full overflow-hidden",role:"progressbar","aria-valuenow":s.value,"aria-valuemin":"0","aria-valuemax":"100"},[e.createElementVNode("div",{class:"h-full rounded-full transition-all duration-300",style:e.normalizeStyle({width:`${s.value}%`,backgroundColor:n.value})},null,4)],8,p)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"one-progress-pie",role:"progressbar","aria-valuenow":s.value,"aria-valuemin":"0","aria-valuemax":"100",style:e.normalizeStyle({"--p":s.value,"--b":`${a.strokeWidth}px`,"--w":`${a.size}px`,"--c":n.value})},null,12,d))}});const m=u._export_sfc(v,[["__scopeId","data-v-80317016"]]);exports.OneProgress=m;exports.progressProps=i;exports.resolveProgressColor=t;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineComponent as c, computed as n, openBlock as t, createElementBlock as i, createElementVNode as p, normalizeStyle as u } from "vue";
|
|
2
|
+
import { colors as e } from "../tailwind.config.js";
|
|
3
|
+
import { _ as d } from "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const m = {
|
|
5
|
+
primary: e.primary.base,
|
|
6
|
+
secondary: e.secondary.base,
|
|
7
|
+
success: e.success.base,
|
|
8
|
+
info: e.info.base,
|
|
9
|
+
warning: e.warning.base,
|
|
10
|
+
danger: e.danger.base
|
|
11
|
+
}, v = (r) => m[r] ?? r, _ = {
|
|
12
|
+
/** Progress in percent, clamped to 0-100. */
|
|
13
|
+
value: {
|
|
14
|
+
type: Number,
|
|
15
|
+
required: !0
|
|
16
|
+
},
|
|
17
|
+
variant: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "linear"
|
|
20
|
+
},
|
|
21
|
+
/** Semantic theme color name or any CSS color. */
|
|
22
|
+
color: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "primary"
|
|
25
|
+
},
|
|
26
|
+
/** Circle diameter in px (circle variant only). */
|
|
27
|
+
size: {
|
|
28
|
+
type: Number,
|
|
29
|
+
default: 20
|
|
30
|
+
},
|
|
31
|
+
/** Circle stroke width in px (circle variant only). */
|
|
32
|
+
strokeWidth: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 3
|
|
35
|
+
}
|
|
36
|
+
}, y = ["aria-valuenow"], f = ["aria-valuenow"], g = /* @__PURE__ */ c({
|
|
37
|
+
__name: "OneProgress",
|
|
38
|
+
props: _,
|
|
39
|
+
setup(r) {
|
|
40
|
+
const s = r, a = n(() => Math.min(100, Math.max(0, s.value))), l = n(() => v(s.color));
|
|
41
|
+
return (o, b) => o.variant === "linear" ? (t(), i("div", {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "h-2 w-full bg-primary-stroke rounded-full overflow-hidden",
|
|
44
|
+
role: "progressbar",
|
|
45
|
+
"aria-valuenow": a.value,
|
|
46
|
+
"aria-valuemin": "0",
|
|
47
|
+
"aria-valuemax": "100"
|
|
48
|
+
}, [
|
|
49
|
+
p("div", {
|
|
50
|
+
class: "h-full rounded-full transition-all duration-300",
|
|
51
|
+
style: u({ width: `${a.value}%`, backgroundColor: l.value })
|
|
52
|
+
}, null, 4)
|
|
53
|
+
], 8, y)) : (t(), i("div", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: "one-progress-pie",
|
|
56
|
+
role: "progressbar",
|
|
57
|
+
"aria-valuenow": a.value,
|
|
58
|
+
"aria-valuemin": "0",
|
|
59
|
+
"aria-valuemax": "100",
|
|
60
|
+
style: u({
|
|
61
|
+
"--p": a.value,
|
|
62
|
+
"--b": `${o.strokeWidth}px`,
|
|
63
|
+
"--w": `${o.size}px`,
|
|
64
|
+
"--c": l.value
|
|
65
|
+
})
|
|
66
|
+
}, null, 12, f));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const x = /* @__PURE__ */ d(g, [["__scopeId", "data-v-80317016"]]);
|
|
70
|
+
export {
|
|
71
|
+
x as OneProgress,
|
|
72
|
+
_ as progressProps,
|
|
73
|
+
v as resolveProgressColor
|
|
74
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export type ProgressVariantType = 'linear' | 'circle';
|
|
3
|
+
export type ProgressColorType = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger';
|
|
4
|
+
/** Resolves a semantic color name to its theme hex; passes CSS colors through. */
|
|
5
|
+
export declare const resolveProgressColor: (color: string) => string;
|
|
6
|
+
export declare const progressProps: {
|
|
7
|
+
/** Progress in percent, clamped to 0-100. */
|
|
8
|
+
value: {
|
|
9
|
+
type: NumberConstructor;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
variant: {
|
|
13
|
+
type: PropType<ProgressVariantType>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
/** Semantic theme color name or any CSS color. */
|
|
17
|
+
color: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
/** Circle diameter in px (circle variant only). */
|
|
22
|
+
size: {
|
|
23
|
+
type: NumberConstructor;
|
|
24
|
+
default: number;
|
|
25
|
+
};
|
|
26
|
+
/** Circle stroke width in px (circle variant only). */
|
|
27
|
+
strokeWidth: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export type ProgressProps = ExtractPropTypes<typeof progressProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("../MagnifyingGlassIcon-adf871ba.cjs"),v=require("../XMarkIcon-f94baa4c.cjs"),_=require("../spinner/index.cjs"),g=require("../i18n/index.cjs");require("../SpinnerIcon-01be39fe.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");const i={modelValue:{type:String,default:""},loading:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},debounceMs:{type:Number,default:600},clearable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},t:{type:Function,default:void 0}},k={class:"relative"},V={class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"},B=["value","disabled","placeholder"],I={class:"absolute inset-y-0 right-0 pr-2 flex items-center"},S=["aria-label"],q=e.defineComponent({__name:"OneSearchInput",props:i,emits:["update:modelValue","clear"],setup(d,{expose:p,emit:m}){const o=d,n=m,f=g.useOnebI18n(),l=e.computed(()=>o.t??f),y=e.computed(()=>o.placeholder??`${l.value("ui.search_input.Search")}...`);let a;const b=t=>{const r=t.target.value;clearTimeout(a),o.debounceMs>0&&r!==""?a=setTimeout(()=>n("update:modelValue",r),o.debounceMs):n("update:modelValue",r)},c=()=>{clearTimeout(a),n("update:modelValue",""),n("clear")},s=e.ref(null);return e.onMounted(()=>{var t;o.autofocus&&((t=s.value)==null||t.focus())}),e.onBeforeUnmount(()=>clearTimeout(a)),p({focus:()=>{var t;return(t=s.value)==null?void 0:t.focus()}}),(t,r)=>{var u;return e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("div",V,[e.createVNode(e.unref(h.render),{class:"w-4 h-4 text-secondary-content"})]),e.createElementVNode("input",{ref_key:"inputElement",ref:s,value:t.modelValue,type:"text",disabled:t.disabled,class:"pl-8 pr-8 h-10 w-full rounded-10 block border border-primary-stroke focus:border-primary-base focus:ring-primary-base focus:outline-none text-sm duration-200 transition-colors disabled:opacity-50",placeholder:y.value,onInput:b,onKeydown:e.withKeys(c,["esc"])},null,40,B),e.createElementVNode("div",I,[t.loading?(e.openBlock(),e.createBlock(e.unref(_.OneSpinner),{key:0,size:"sm",class:"text-secondary-content"})):t.clearable&&t.modelValue.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"p-1 rounded hover:bg-secondary-10 text-secondary-content hover:text-primary-base transition-colors","aria-label":((u=l.value)==null?void 0:u.call(l,"ui.search_input.Clear"))??"Clear",onClick:c},[e.createVNode(e.unref(v.render),{class:"w-4 h-4"})],8,S)):e.createCommentVNode("",!0)])])}}});exports.OneSearchInput=q;exports.searchInputProps=i;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as g, computed as p, ref as k, onMounted as B, onBeforeUnmount as x, openBlock as s, createElementBlock as m, createElementVNode as c, createVNode as f, unref as u, withKeys as C, createBlock as S, createCommentVNode as w } from "vue";
|
|
2
|
+
import { r as I } from "../MagnifyingGlassIcon-ca213d3d.js";
|
|
3
|
+
import { r as T } from "../XMarkIcon-51ef0691.js";
|
|
4
|
+
import { OneSpinner as E } from "../spinner/index.js";
|
|
5
|
+
import { useOnebI18n as M } from "../i18n/index.js";
|
|
6
|
+
import "../SpinnerIcon-516264ba.js";
|
|
7
|
+
import "../_plugin-vue_export-helper-dad06003.js";
|
|
8
|
+
const N = {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
loading: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
autofocus: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
},
|
|
21
|
+
placeholder: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
/** Debounce for update:modelValue in ms; 0 emits immediately. */
|
|
26
|
+
debounceMs: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 600
|
|
29
|
+
},
|
|
30
|
+
clearable: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: !0
|
|
33
|
+
},
|
|
34
|
+
disabled: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
/** Override the injected translate function. */
|
|
39
|
+
t: {
|
|
40
|
+
type: Function,
|
|
41
|
+
default: void 0
|
|
42
|
+
}
|
|
43
|
+
}, O = { class: "relative" }, $ = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, K = ["value", "disabled", "placeholder"], P = { class: "absolute inset-y-0 right-0 pr-2 flex items-center" }, j = ["aria-label"], H = /* @__PURE__ */ g({
|
|
44
|
+
__name: "OneSearchInput",
|
|
45
|
+
props: N,
|
|
46
|
+
emits: ["update:modelValue", "clear"],
|
|
47
|
+
setup(b, { expose: y, emit: h }) {
|
|
48
|
+
const t = b, o = h, v = M(), a = p(() => t.t ?? v), _ = p(
|
|
49
|
+
() => t.placeholder ?? `${a.value("ui.search_input.Search")}...`
|
|
50
|
+
);
|
|
51
|
+
let l;
|
|
52
|
+
const V = (e) => {
|
|
53
|
+
const n = e.target.value;
|
|
54
|
+
clearTimeout(l), t.debounceMs > 0 && n !== "" ? l = setTimeout(() => o("update:modelValue", n), t.debounceMs) : o("update:modelValue", n);
|
|
55
|
+
}, i = () => {
|
|
56
|
+
clearTimeout(l), o("update:modelValue", ""), o("clear");
|
|
57
|
+
}, r = k(null);
|
|
58
|
+
return B(() => {
|
|
59
|
+
var e;
|
|
60
|
+
t.autofocus && ((e = r.value) == null || e.focus());
|
|
61
|
+
}), x(() => clearTimeout(l)), y({ focus: () => {
|
|
62
|
+
var e;
|
|
63
|
+
return (e = r.value) == null ? void 0 : e.focus();
|
|
64
|
+
} }), (e, n) => {
|
|
65
|
+
var d;
|
|
66
|
+
return s(), m("div", O, [
|
|
67
|
+
c("div", $, [
|
|
68
|
+
f(u(I), { class: "w-4 h-4 text-secondary-content" })
|
|
69
|
+
]),
|
|
70
|
+
c("input", {
|
|
71
|
+
ref_key: "inputElement",
|
|
72
|
+
ref: r,
|
|
73
|
+
value: e.modelValue,
|
|
74
|
+
type: "text",
|
|
75
|
+
disabled: e.disabled,
|
|
76
|
+
class: "pl-8 pr-8 h-10 w-full rounded-10 block border border-primary-stroke focus:border-primary-base focus:ring-primary-base focus:outline-none text-sm duration-200 transition-colors disabled:opacity-50",
|
|
77
|
+
placeholder: _.value,
|
|
78
|
+
onInput: V,
|
|
79
|
+
onKeydown: C(i, ["esc"])
|
|
80
|
+
}, null, 40, K),
|
|
81
|
+
c("div", P, [
|
|
82
|
+
e.loading ? (s(), S(u(E), {
|
|
83
|
+
key: 0,
|
|
84
|
+
size: "sm",
|
|
85
|
+
class: "text-secondary-content"
|
|
86
|
+
})) : e.clearable && e.modelValue.length > 0 ? (s(), m("button", {
|
|
87
|
+
key: 1,
|
|
88
|
+
type: "button",
|
|
89
|
+
class: "p-1 rounded hover:bg-secondary-10 text-secondary-content hover:text-primary-base transition-colors",
|
|
90
|
+
"aria-label": ((d = a.value) == null ? void 0 : d.call(a, "ui.search_input.Clear")) ?? "Clear",
|
|
91
|
+
onClick: i
|
|
92
|
+
}, [
|
|
93
|
+
f(u(T), { class: "w-4 h-4" })
|
|
94
|
+
], 8, j)) : w("", !0)
|
|
95
|
+
])
|
|
96
|
+
]);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
H as OneSearchInput,
|
|
102
|
+
N as searchInputProps
|
|
103
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
import type { TranslateFunction } from '../i18n/plugin';
|
|
3
|
+
export declare const searchInputProps: {
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
loading: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
autofocus: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
placeholder: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: any;
|
|
19
|
+
};
|
|
20
|
+
/** Debounce for update:modelValue in ms; 0 emits immediately. */
|
|
21
|
+
debounceMs: {
|
|
22
|
+
type: NumberConstructor;
|
|
23
|
+
default: number;
|
|
24
|
+
};
|
|
25
|
+
clearable: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
disabled: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
/** Override the injected translate function. */
|
|
34
|
+
t: {
|
|
35
|
+
type: PropType<TranslateFunction>;
|
|
36
|
+
default: any;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export type SearchInputProps = ExtractPropTypes<typeof searchInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i={class:"flex h-full flex-col overflow-hidden sm:flex-row"},a={"aria-label":"Settings navigation",class:"flex shrink-0 gap-1 overflow-x-auto border-b border-primary-stroke bg-secondary-body p-2 sm:w-64 sm:flex-col sm:gap-0.5 sm:overflow-visible sm:border-b-0 sm:border-r sm:py-4 sm:px-0"},d={class:"flex-1"},m={key:1,class:"ml-2 rounded-full bg-primary-10 px-2 py-0.5 text-xs font-semibold text-primary-base"},p={class:"min-w-0 flex-1 overflow-auto p-5"},u=e.defineComponent({__name:"OneSettingsLayout",props:{items:{type:Array,required:!0}},setup(t){const o=t,l=e.computed(()=>o.items.filter(n=>n.show!==!1)),r=n=>typeof n.to=="string"?n.to:JSON.stringify(n.to);return(n,$)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("nav",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,s=>(e.openBlock(),e.createBlock(c,{key:r(s),to:s.to,class:"flex items-center whitespace-nowrap rounded px-4 py-2.5 text-sm font-medium text-gray-700 hover:bg-primary-body-hover sm:rounded-none","active-class":"bg-primary-body-active font-semibold"},{default:e.withCtx(()=>[s.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.icon),{key:0,class:"mr-2.5 h-5 w-5 flex-shrink-0"})):e.createCommentVNode("",!0),e.createElementVNode("span",d,e.toDisplayString(s.label),1),s.badge!=null?(e.openBlock(),e.createElementBlock("span",m,e.toDisplayString(s.badge),1)):e.createCommentVNode("",!0)]),_:2},1032,["to"]))),128))]),e.createElementVNode("div",p,[e.renderSlot(n.$slots,"default")])])}}}),y={class:"bg-[#FAFAFA] rounded-lg p-5 max-w-3xl"},f={key:0,class:"flex items-start justify-between gap-4 mb-2"},k={class:"min-w-0"},b={key:0,class:"text-base font-semibold"},g={key:1,class:"text-sm text-[#979CA9] mt-0.5"},h={key:0,class:"shrink-0"},_=e.defineComponent({__name:"OneSettingsSection",props:{title:{type:String,default:""},hint:{type:String,default:""}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("section",y,[t.title||t.hint||o.$slots.action?(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",k,[t.title?(e.openBlock(),e.createElementBlock("h2",b,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.hint?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(t.hint),1)):e.createCommentVNode("",!0)]),o.$slots.action?(e.openBlock(),e.createElementBlock("div",h,[e.renderSlot(o.$slots,"action")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]))}}),S={class:"flex items-center justify-between gap-4 py-3 border-b border-[#E3ECF2] last:border-b-0"},v={class:"pr-4 min-w-0"},x={class:"font-medium"},B={key:0,class:"text-sm text-[#979CA9]"},w={class:"shrink-0"},E=e.defineComponent({__name:"OneSettingsRow",props:{label:{type:String,default:""},description:{type:String,default:""}},setup(t){return(o,l)=>(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("div",v,[e.renderSlot(o.$slots,"label",{},()=>[e.createElementVNode("p",x,e.toDisplayString(t.label),1)]),t.description?(e.openBlock(),e.createElementBlock("p",B,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",w,[e.renderSlot(o.$slots,"default")])]))}});exports.OneSettingsLayout=u;exports.OneSettingsRow=E;exports.OneSettingsSection=_;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { defineComponent as m, computed as y, resolveComponent as b, openBlock as t, createElementBlock as s, createElementVNode as l, Fragment as h, renderList as _, createBlock as u, withCtx as g, resolveDynamicComponent as x, createCommentVNode as i, toDisplayString as a, renderSlot as c } from "vue";
|
|
2
|
+
const v = { class: "flex h-full flex-col overflow-hidden sm:flex-row" }, k = {
|
|
3
|
+
"aria-label": "Settings navigation",
|
|
4
|
+
class: "flex shrink-0 gap-1 overflow-x-auto border-b border-primary-stroke bg-secondary-body p-2 sm:w-64 sm:flex-col sm:gap-0.5 sm:overflow-visible sm:border-b-0 sm:border-r sm:py-4 sm:px-0"
|
|
5
|
+
}, w = { class: "flex-1" }, $ = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "ml-2 rounded-full bg-primary-10 px-2 py-0.5 text-xs font-semibold text-primary-base"
|
|
8
|
+
}, S = { class: "min-w-0 flex-1 overflow-auto p-5" }, I = /* @__PURE__ */ m({
|
|
9
|
+
__name: "OneSettingsLayout",
|
|
10
|
+
props: {
|
|
11
|
+
items: {
|
|
12
|
+
type: Array,
|
|
13
|
+
required: !0
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(e) {
|
|
17
|
+
const o = e, d = y(() => o.items.filter((n) => n.show !== !1)), p = (n) => typeof n.to == "string" ? n.to : JSON.stringify(n.to);
|
|
18
|
+
return (n, V) => {
|
|
19
|
+
const f = b("router-link");
|
|
20
|
+
return t(), s("div", v, [
|
|
21
|
+
l("nav", k, [
|
|
22
|
+
(t(!0), s(h, null, _(d.value, (r) => (t(), u(f, {
|
|
23
|
+
key: p(r),
|
|
24
|
+
to: r.to,
|
|
25
|
+
class: "flex items-center whitespace-nowrap rounded px-4 py-2.5 text-sm font-medium text-gray-700 hover:bg-primary-body-hover sm:rounded-none",
|
|
26
|
+
"active-class": "bg-primary-body-active font-semibold"
|
|
27
|
+
}, {
|
|
28
|
+
default: g(() => [
|
|
29
|
+
r.icon ? (t(), u(x(r.icon), {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "mr-2.5 h-5 w-5 flex-shrink-0"
|
|
32
|
+
})) : i("", !0),
|
|
33
|
+
l("span", w, a(r.label), 1),
|
|
34
|
+
r.badge != null ? (t(), s("span", $, a(r.badge), 1)) : i("", !0)
|
|
35
|
+
]),
|
|
36
|
+
_: 2
|
|
37
|
+
}, 1032, ["to"]))), 128))
|
|
38
|
+
]),
|
|
39
|
+
l("div", S, [
|
|
40
|
+
c(n.$slots, "default")
|
|
41
|
+
])
|
|
42
|
+
]);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}), C = { class: "bg-[#FAFAFA] rounded-lg p-5 max-w-3xl" }, O = {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: "flex items-start justify-between gap-4 mb-2"
|
|
48
|
+
}, A = { class: "min-w-0" }, F = {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "text-base font-semibold"
|
|
51
|
+
}, E = {
|
|
52
|
+
key: 1,
|
|
53
|
+
class: "text-sm text-[#979CA9] mt-0.5"
|
|
54
|
+
}, B = {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: "shrink-0"
|
|
57
|
+
}, J = /* @__PURE__ */ m({
|
|
58
|
+
__name: "OneSettingsSection",
|
|
59
|
+
props: {
|
|
60
|
+
title: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: ""
|
|
63
|
+
},
|
|
64
|
+
hint: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: ""
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
setup(e) {
|
|
70
|
+
return (o, d) => (t(), s("section", C, [
|
|
71
|
+
e.title || e.hint || o.$slots.action ? (t(), s("div", O, [
|
|
72
|
+
l("div", A, [
|
|
73
|
+
e.title ? (t(), s("h2", F, a(e.title), 1)) : i("", !0),
|
|
74
|
+
e.hint ? (t(), s("p", E, a(e.hint), 1)) : i("", !0)
|
|
75
|
+
]),
|
|
76
|
+
o.$slots.action ? (t(), s("div", B, [
|
|
77
|
+
c(o.$slots, "action")
|
|
78
|
+
])) : i("", !0)
|
|
79
|
+
])) : i("", !0),
|
|
80
|
+
c(o.$slots, "default")
|
|
81
|
+
]));
|
|
82
|
+
}
|
|
83
|
+
}), L = { class: "flex items-center justify-between gap-4 py-3 border-b border-[#E3ECF2] last:border-b-0" }, N = { class: "pr-4 min-w-0" }, j = { class: "font-medium" }, D = {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: "text-sm text-[#979CA9]"
|
|
86
|
+
}, R = { class: "shrink-0" }, K = /* @__PURE__ */ m({
|
|
87
|
+
__name: "OneSettingsRow",
|
|
88
|
+
props: {
|
|
89
|
+
label: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: ""
|
|
92
|
+
},
|
|
93
|
+
description: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: ""
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
setup(e) {
|
|
99
|
+
return (o, d) => (t(), s("div", L, [
|
|
100
|
+
l("div", N, [
|
|
101
|
+
c(o.$slots, "label", {}, () => [
|
|
102
|
+
l("p", j, a(e.label), 1)
|
|
103
|
+
]),
|
|
104
|
+
e.description ? (t(), s("p", D, a(e.description), 1)) : i("", !0)
|
|
105
|
+
]),
|
|
106
|
+
l("div", R, [
|
|
107
|
+
c(o.$slots, "default")
|
|
108
|
+
])
|
|
109
|
+
]));
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
export {
|
|
113
|
+
I as OneSettingsLayout,
|
|
114
|
+
K as OneSettingsRow,
|
|
115
|
+
J as OneSettingsSection
|
|
116
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("../SpinnerIcon-01be39fe.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");const n={xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"},s={size:{type:String,default:"md"}},t=e.defineComponent({__name:"OneSpinner",props:s,setup(r){const i=r;return(c,l)=>(e.openBlock(),e.createBlock(o.SpinnerIcon,{class:e.normalizeClass(e.unref(n)[i.size]),role:"status","aria-label":"loading"},null,8,["class"]))}});exports.OneSpinner=t;exports.spinnerProps=s;exports.spinnerSizeClasses=n;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as s, openBlock as r, createBlock as o, normalizeClass as t, unref as p } from "vue";
|
|
2
|
+
import { S as a } from "../SpinnerIcon-516264ba.js";
|
|
3
|
+
import "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const i = {
|
|
5
|
+
xs: "w-3 h-3",
|
|
6
|
+
sm: "w-4 h-4",
|
|
7
|
+
md: "w-6 h-6",
|
|
8
|
+
lg: "w-8 h-8"
|
|
9
|
+
}, l = {
|
|
10
|
+
size: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: "md"
|
|
13
|
+
}
|
|
14
|
+
}, _ = /* @__PURE__ */ s({
|
|
15
|
+
__name: "OneSpinner",
|
|
16
|
+
props: l,
|
|
17
|
+
setup(n) {
|
|
18
|
+
const e = n;
|
|
19
|
+
return (c, m) => (r(), o(a, {
|
|
20
|
+
class: t(p(i)[e.size]),
|
|
21
|
+
role: "status",
|
|
22
|
+
"aria-label": "loading"
|
|
23
|
+
}, null, 8, ["class"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
_ as OneSpinner,
|
|
28
|
+
l as spinnerProps,
|
|
29
|
+
i as spinnerSizeClasses
|
|
30
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
|
2
|
+
export type SpinnerSizeType = 'xs' | 'sm' | 'md' | 'lg';
|
|
3
|
+
export declare const spinnerSizeClasses: Record<SpinnerSizeType, string>;
|
|
4
|
+
export declare const spinnerProps: {
|
|
5
|
+
size: {
|
|
6
|
+
type: PropType<SpinnerSizeType>;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type SpinnerProps = ExtractPropTypes<typeof spinnerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("../OneModal-0e92c039.cjs"),C=require("../useModal-aa6f4a57.cjs"),m=require("../button/index.cjs"),N=require("../InformationCircleIcon-d6b67d5d.cjs");require("../useIsMobile-7b1f08cf.cjs");require("../useMediaQuery-1d87df02.cjs");require("../_plugin-vue_export-helper-f246444f.cjs");require("../SpinnerIcon-01be39fe.cjs");const v={alpha:{color:"yellow",label:"Дочасний доступ",hint:"Натисніть, щоб дізнатися більше про стадію запуску сервісу",modalTitle:"Сервіс у режимі дочасного доступу",intro:"Зараз сервіс відкритий обмеженому колу користувачів OneB. Він уже працює, але ще активно розвивається — ми додаємо нові можливості та вдосконалюємо наявні, тож інколи можливі помилки або зміни в інтерфейсі.",whatsNext:"Далі на сервіс чекає етап підготовки до релізу, а потім — повноцінний запуск. Дякуємо, що користуєтеся ним уже зараз і допомагаєте робити його кращим.",participate:"Це ваша унікальна можливість вплинути на розробку: поділіться своїми ідеями — які функції додати чи що змінити, — і ми врахуємо їх у наступних оновленнях.",support:"Якщо ви знайшли помилку або щось працює не так, як очікували — напишіть у підтримку, і ми оперативно все виправимо."},beta:{color:"blue",label:"Пре-реліз",hint:"Натисніть, щоб дізнатися більше про стадію запуску сервісу",modalTitle:"Сервіс у режимі підготовки до релізу",intro:"Сервіс уже майже готовий до повноцінного запуску. Основні можливості стабільні, ми завершуємо фінальне шліфування — інколи ще можливі незначні зміни в інтерфейсі.",whatsNext:"Найближчим часом — повноцінний реліз. Дякуємо, що з нами на цьому етапі й допомагаєте відполірувати останні деталі.",participate:"Ваші ідеї досі важливі: підкажіть, що покращити перед релізом, — і ми постараємося врахувати це.",support:"Помітили помилку чи незручність — напишіть у підтримку, ми швидко відреагуємо."}},T="Написати в підтримку",w="Зрозуміло",x={stage:{type:String,required:!0},color:{type:String},label:{type:String},hint:{type:String},modalTitle:{type:String},intro:{type:String},whatsNext:{type:String},participate:{type:String},support:{type:String},contactSupportLabel:{type:String},dismissLabel:{type:String},showContactSupport:{type:Boolean,default:!0},supportUrl:{type:String,default:"https://t.me/onebapp_bot"}},L=["title","aria-label"],D={class:"p-4 space-y-3 text-sm text-gray-700"},E={key:0},V={key:1},q={key:2},O={key:3},M={class:"flex justify-end space-x-3 pt-2"},U=e.defineComponent({__name:"OneStageBadge",props:x,emits:["contact-support","dismiss","open"],setup(y,{emit:S}){const t=y,r=S,l=C.useModal(!1),o=e.computed(()=>v[t.stage]),g=e.computed(()=>t.color??o.value.color),b=e.computed(()=>t.label??o.value.label),n=e.computed(()=>t.hint??o.value.hint),h=e.computed(()=>t.modalTitle??o.value.modalTitle),s=e.computed(()=>t.intro??o.value.intro),c=e.computed(()=>t.whatsNext??o.value.whatsNext),i=e.computed(()=>t.participate??o.value.participate),p=e.computed(()=>t.support??o.value.support),f=e.computed(()=>t.contactSupportLabel??T),_=e.computed(()=>t.dismissLabel??w),k=()=>{l.open(),r("open")},u=()=>{l.close(),t.supportUrl&&window.open(t.supportUrl,"_blank","noopener,noreferrer"),r("contact-support")},d=()=>{l.close(),r("dismiss")};return(a,A)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("button",{type:"button",class:e.normalizeClass([`${g.value}-filled`,"inline-flex items-center gap-1 text-xs font-semibold py-1 px-2.5 rounded-full shadow cursor-pointer hover:opacity-80 transition-opacity"]),title:n.value,"aria-label":n.value,onClick:k},[e.renderSlot(a.$slots,"badge",{},()=>[e.createTextVNode(e.toDisplayString(b.value)+" ",1),e.createVNode(e.unref(N.render),{class:"w-3.5 h-3.5","aria-hidden":"true"})])],10,L),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.unref(B.OneModal),{"use-modal":e.unref(l),title:h.value},{default:e.withCtx(()=>[e.createElementVNode("div",D,[e.renderSlot(a.$slots,"body",{},()=>[s.value?(e.openBlock(),e.createElementBlock("p",E,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("p",V,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("p",q,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("p",O,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)]),e.renderSlot(a.$slots,"actions",{contactSupport:u,dismiss:d},()=>[e.createElementVNode("div",M,[a.showContactSupport?(e.openBlock(),e.createBlock(e.unref(m.OneButton),{key:0,variant:"secondary",label:f.value,onClick:u},null,8,["label"])):e.createCommentVNode("",!0),e.createVNode(e.unref(m.OneButton),{variant:"primary",label:_.value,onClick:d},null,8,["label"])])])])]),_:3},8,["use-modal","title"])]))],64))}});exports.OneStageBadge=U;exports.stageDefaults=v;
|