@orchidui/core 0.0.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/Calendar.js +103 -0
- package/dist/Cropper.js +6 -0
- package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +4 -0
- package/dist/DataDisplay/FloatContent/OcFloatContent.js +4 -0
- package/dist/DataDisplay/HorizontalProgressbar/OcHorizontalProgressbar.js +4 -0
- package/dist/DataDisplay/InfoCard/OcInfoCard.js +4 -0
- package/dist/DataDisplay/ListDetail/OcListDetail.js +4 -0
- package/dist/DataDisplay/ListItem/OcListItem.js +5 -0
- package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +4 -0
- package/dist/DataDisplay/Overview/OcOverview.js +7 -0
- package/dist/DataDisplay/Pagination/OcPagination.js +6 -0
- package/dist/DataDisplay/ProgressBar/OcProgressBar.js +4 -0
- package/dist/DataDisplay/Table/OcTable.js +11 -0
- package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +4 -0
- package/dist/DatePicker-D3w435Ml.js +263 -0
- package/dist/Disclosure/Accordion/OcAccordion.js +4 -0
- package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +4 -0
- package/dist/Disclosure/Steps/OcSteps.js +5 -0
- package/dist/Disclosure/SwitchTabs/OcSwitchTabs.js +4 -0
- package/dist/Disclosure/Tabs/Tabs.js +5 -0
- package/dist/Disclosure/Variants/OcVariants.js +5 -0
- package/dist/Draggable.js +168 -0
- package/dist/Elements/AdditionalContent/OcAdditionalContent.js +5 -0
- package/dist/Elements/AuthenticationOption/AuthenticationOption.js +4 -0
- package/dist/Elements/Box/OcBox.js +4 -0
- package/dist/Elements/EmptyPage/OcEmptyPage.js +4 -0
- package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +4 -0
- package/dist/Elements/Header/OcHeader.js +9 -0
- package/dist/Elements/PageTitle/OcPageTitle.js +7 -0
- package/dist/Elements/SandboxBanner/OcSandboxBanner.js +4 -0
- package/dist/Elements/Sidebar/OcSidebar.js +6 -0
- package/dist/Elements/Skeleton/OcSkeleton.js +4 -0
- package/dist/Elements/SubSidebar/OcSubSidebar.js +4 -0
- package/dist/Elements/VerificationOption/OcVerificationOption.js +4 -0
- package/dist/EmojiPicker.js +4 -0
- package/dist/Feedback/Banner/OcBanner.js +4 -0
- package/dist/Feedback/Chip/OcChip.js +4 -0
- package/dist/Feedback/ShareIcon/OcShareIcon.js +4 -0
- package/dist/Feedback/Snackbar/OcSnackbar.js +4 -0
- package/dist/Feedback/Tag/OcTag.js +4 -0
- package/dist/Form/BaseInput/OcBaseInput.js +4 -0
- package/dist/Form/Button/OcButton.js +4 -0
- package/dist/Form/Calendar/OcCalendar.js +5 -0
- package/dist/Form/CardInput/OcCardInput.js +4 -0
- package/dist/Form/Checkbox/OcCheckbox.js +4 -0
- package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +4 -0
- package/dist/Form/Criteria/OcCriteria.js +4 -0
- package/dist/Form/Cropper/OcCropper.js +4 -0
- package/dist/Form/DatePicker/OcDatePicker.js +4 -0
- package/dist/Form/EmojiPicker/OcEmojiPicker.js +4 -0
- package/dist/Form/EmojiPicker/conts/emoji.js +1030 -0
- package/dist/Form/Input/OcInput.js +6 -0
- package/dist/Form/LinkInput/OcLinkInput.js +4 -0
- package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +4 -0
- package/dist/Form/NumberInput/OcNumberInput.js +4 -0
- package/dist/Form/PhoneInput/OcPhoneInput.js +4 -0
- package/dist/Form/Radio/OcRadio.js +4 -0
- package/dist/Form/RadioGroup/OcRadioGroup.js +4 -0
- package/dist/Form/RangeInput/OcRangeInput.js +4 -0
- package/dist/Form/SectionItem/OcSectionItem.js +4 -0
- package/dist/Form/Select/OcSelect.js +7 -0
- package/dist/Form/SelectOptions/OcSelectOptions.js +4 -0
- package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +4 -0
- package/dist/Form/Slider/OcSlider.js +4 -0
- package/dist/Form/TextArea/OcTextArea.js +4 -0
- package/dist/Form/TimePicker/OcTimePicker.js +6 -0
- package/dist/Form/Toggle/OcToggle.js +4 -0
- package/dist/Form/index.js +54 -0
- package/dist/FormBuilder/OcFormBuilder.js +4 -0
- package/dist/MediaAndIcons/Avatar/OcAvatar.js +4 -0
- package/dist/MediaAndIcons/Icon/OcIcon.js +4 -0
- package/dist/OcAccordion-DdkNsXvN.js +101 -0
- package/dist/OcAccountSetup-BXDjf48o.js +324 -0
- package/dist/OcAdditionalContent-BMSysCXu.js +612 -0
- package/dist/OcAuthenticationOption.vue_vue_type_script_setup_true_lang-w5Y0ymGN.js +43 -0
- package/dist/OcAvatar-NDXQiZvz.js +41 -0
- package/dist/OcBanner-Cg2WJV6e.js +108 -0
- package/dist/OcBox.vue_vue_type_script_setup_true_lang-aB397QRg.js +43 -0
- package/dist/OcCardInput-BFE4Xu-S.js +75 -0
- package/dist/OcCheckboxesGroup-CLbquUO2.js +94 -0
- package/dist/OcChip-B1hm2Qni.js +144 -0
- package/dist/OcComplexCalendar-x-_kg9Yk.js +108 -0
- package/dist/OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js +1006 -0
- package/dist/OcConfirmationModal-BfCrRV9r.js +179 -0
- package/dist/OcCopyTooltip.vue_vue_type_script_setup_true_lang-S2RAfV_g.js +65 -0
- package/dist/OcCriteria-CpIohheZ.js +42 -0
- package/dist/OcCropper-31Y_S1Ne.js +240 -0
- package/dist/OcCustomerCard-DbDOBO03.js +160 -0
- package/dist/OcDraggable-BjhGJmpM.js +35 -0
- package/dist/OcDropdownItem-DAElmzEu.js +57 -0
- package/dist/OcEmojiPicker-BXm-_OGK.js +157 -0
- package/dist/OcEmptyPage-CTwgMzRp.js +155 -0
- package/dist/OcExpadingTable.vue_vue_type_script_setup_true_lang-B4HOMDBK.js +815 -0
- package/dist/OcFeatureOverviewCard-RVyrWLVW.js +71 -0
- package/dist/OcFloatContent-BIKQOxSw.js +142 -0
- package/dist/OcFormBuilder-CRXWtt8I.js +177 -0
- package/dist/OcGroupOptions-ChGJvTXl.js +16 -0
- package/dist/OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-4eVgPDi5.js +32 -0
- package/dist/OcIcon-CJgBICxh.js +63 -0
- package/dist/OcInfoCard-DpYUZOMZ.js +81 -0
- package/dist/OcInput-tcRxG3Y2.js +227 -0
- package/dist/OcInputOption-CncASfNt.js +160 -0
- package/dist/OcLinkInput-C2ixk-gk.js +143 -0
- package/dist/OcListDetail-6XeME6ko.js +76 -0
- package/dist/OcListUrl.vue_vue_type_script_setup_true_lang-BEJafLuT.js +749 -0
- package/dist/OcModal-DdD5VFEN.js +187 -0
- package/dist/OcModalCropper-D2OI2iun.js +56 -0
- package/dist/OcModalPage-BLVa-kcB.js +86 -0
- package/dist/OcMultipleUploadFile-B8Wl9Fuq.js +446 -0
- package/dist/OcNumberInput.vue_vue_type_script_setup_true_lang-C4EXUIUe.js +90 -0
- package/dist/OcOnboardingListItem.vue_vue_type_script_setup_true_lang-Cr80xmnz.js +81 -0
- package/dist/OcOption-DK2FBGq7.js +485 -0
- package/dist/OcOverviewIcon-D702Ujka.js +55 -0
- package/dist/OcOverviewItem-DNr5tWnt.js +186 -0
- package/dist/OcPageTitleRight-DMtJ1qmZ.js +243 -0
- package/dist/OcPaginationNumber-IKPorX26.js +172 -0
- package/dist/OcPaymentTab-Cna1IAhO.js +170 -0
- package/dist/OcPhoneInput-AC6BgQhN.js +432 -0
- package/dist/OcPopper-C11OgQAj.js +97 -0
- package/dist/OcPrimaryActions-D5IprKsQ.js +222 -0
- package/dist/OcProgressBar-hiyC5XSc.js +33 -0
- package/dist/OcRadio-CRYfNwV9.js +107 -0
- package/dist/OcRadioGroup-DgfdWJos.js +76 -0
- package/dist/OcRangeInput-C-hoHFhr.js +103 -0
- package/dist/OcSandboxBanner.vue_vue_type_script_setup_true_lang-BD0k_8xa.js +37 -0
- package/dist/OcSectionItem-BFgxO3se.js +84 -0
- package/dist/OcSelectOptions-BQlG_EUA.js +148 -0
- package/dist/OcShareIcon-BB-NPq0r.js +53 -0
- package/dist/OcSingleFileUpload-B8-e1H5t.js +464 -0
- package/dist/OcSkeleton-BdPTmGh0.js +13 -0
- package/dist/OcSlider-Bsi-ckbP.js +124 -0
- package/dist/OcSnackbar-CKxY1-ej.js +196 -0
- package/dist/OcSteps.vue_vue_type_script_setup_true_lang-CXGy8ma_.js +87 -0
- package/dist/OcSubSidebar.vue_vue_type_script_setup_true_lang-CNxgU07N.js +60 -0
- package/dist/OcSupportMenu.vue_vue_type_script_setup_true_lang-DrjZsWti.js +114 -0
- package/dist/OcSwitchTabs-CYp676bj.js +31 -0
- package/dist/OcTabToSelect-BHAz1Niv.js +183 -0
- package/dist/OcTag.vue_vue_type_script_setup_true_lang-D19lw-8Y.js +26 -0
- package/dist/OcTextArea-BpV1Bnj_.js +78 -0
- package/dist/OcTheme-CWgrJh5Q.js +25 -0
- package/dist/OcTimePicker-B61MCi0D.js +110 -0
- package/dist/OcTimePopup-zQFKCZLk.js +131 -0
- package/dist/OcToggle-C0wTjM_Y.js +54 -0
- package/dist/OcTransferSummary-Bk2GXhrT.js +67 -0
- package/dist/OcVariant.vue_vue_type_script_setup_true_lang-CY_82DLc.js +99 -0
- package/dist/OcVerificationOption.vue_vue_type_script_setup_true_lang-ChqvNoDe.js +59 -0
- package/dist/OcWhiteList.vue_vue_type_script_setup_true_lang-DI9pYU3w.js +64 -0
- package/dist/OnboardingAccordion.vue_vue_type_script_setup_true_lang-B0Z7ETmj.js +113 -0
- package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +4 -0
- package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +4 -0
- package/dist/Overlay/Dropdown/OcDropdown.js +6 -0
- package/dist/Overlay/Modal/OcModal.js +6 -0
- package/dist/Overlay/Popper/OcPopper.js +4 -0
- package/dist/Overlay/SupportMenu/OcSupportMenu.js +4 -0
- package/dist/Overlay/Tooltip/OcTooltip.js +4 -0
- package/dist/Overlay/Whitelist/OcWhiteList.js +4 -0
- package/dist/StoreDesign.js +240 -0
- package/dist/Theme/OcTheme.js +4 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/composables/helpers.js +48 -0
- package/dist/composables/uploadFileProgress.js +62 -0
- package/dist/composables/useWindowWidth.js +10 -0
- package/dist/data/Validator.js +5 -0
- package/dist/directives/clickOutside.js +13 -0
- package/dist/index.js +177 -1
- package/dist/style.css +1 -0
- package/package.json +23 -5
@@ -0,0 +1,446 @@
|
|
1
|
+
import { ref as x, computed as P, openBlock as o, createElementBlock as u, createElementVNode as i, createVNode as v, unref as n, createCommentVNode as k, createBlock as B, normalizeStyle as M, withCtx as D, Fragment as A, renderList as T, normalizeClass as y, renderSlot as N, onMounted as L, mergeProps as q, toDisplayString as V } from "vue";
|
2
|
+
import "dayjs";
|
3
|
+
import { D as G, _ as H, B as J } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
|
4
|
+
import { _ as I } from "./OcIcon-CJgBICxh.js";
|
5
|
+
/* empty css */
|
6
|
+
import "libphonenumber-js";
|
7
|
+
/* empty css */
|
8
|
+
import "v-calendar";
|
9
|
+
/* empty css */
|
10
|
+
import { useUploadFileProgress as K } from "./composables/uploadFileProgress.js";
|
11
|
+
import { ModalCropper as Q } from "./Cropper.js";
|
12
|
+
import { _ as W } from "./OcDraggable-BjhGJmpM.js";
|
13
|
+
import { _ as X } from "./OcConfirmationModal-BfCrRV9r.js";
|
14
|
+
import "@popperjs/core";
|
15
|
+
const Y = { class: "relative min-h-[100px]" }, Z = {
|
16
|
+
key: 0,
|
17
|
+
class: "absolute"
|
18
|
+
}, _ = { class: "w-[100px] hover:bg-oc-primary-50 cursor-pointer bg-oc-accent-1-50 text-oc-accent-1 rounded aspect-square flex items-center justify-center" }, ee = ["accept", "multiple"], te = ["onClick"], le = { class: "py-2 flex flex-col" }, ae = ["onClick"], oe = ["onClick"], ne = { class: "z-[1009] hidden group-hover:flex absolute bg-black/30 w-full h-full top-0 left-0 rounded" }, ie = {
|
19
|
+
key: 0,
|
20
|
+
class: "cursor-pointer m-auto drag-el"
|
21
|
+
}, se = {
|
22
|
+
__name: "OcSimpleMultipleUpload",
|
23
|
+
props: {
|
24
|
+
accept: {
|
25
|
+
type: String,
|
26
|
+
default: ""
|
27
|
+
},
|
28
|
+
uploadedImages: {
|
29
|
+
type: Array,
|
30
|
+
default: () => []
|
31
|
+
},
|
32
|
+
selectedImage: {
|
33
|
+
type: Object,
|
34
|
+
default: () => ({})
|
35
|
+
},
|
36
|
+
columnsCount: {
|
37
|
+
type: Number,
|
38
|
+
default: 3
|
39
|
+
},
|
40
|
+
inputOptions: Array,
|
41
|
+
maxImages: Number
|
42
|
+
},
|
43
|
+
emits: [
|
44
|
+
"change",
|
45
|
+
"update:selectedImage",
|
46
|
+
"update:uploadedImages",
|
47
|
+
"onRemoveImage",
|
48
|
+
"onEditImage",
|
49
|
+
"delete",
|
50
|
+
"onMaxFileExceed",
|
51
|
+
"fileExist",
|
52
|
+
"invalidFileType"
|
53
|
+
],
|
54
|
+
setup(e, { emit: z }) {
|
55
|
+
const d = e, m = z, b = x([]), f = x(!1), p = x(""), F = x({}), h = P(() => d.uploadedImages[p.value].fileUrl), $ = x(!1), w = x(""), U = (r) => {
|
56
|
+
$.value = !0, w.value = r;
|
57
|
+
}, O = x(!1), S = () => {
|
58
|
+
const r = d.uploadedImages.find((a, c) => c === w.value);
|
59
|
+
r.current ? m("onRemoveImage", r) : (m("delete", w.value), O.value = !0, setTimeout(() => {
|
60
|
+
O.value = !1;
|
61
|
+
}, 1e3)), m(
|
62
|
+
"update:uploadedImages",
|
63
|
+
d.uploadedImages.filter((a, c) => c !== w.value)
|
64
|
+
), $.value = !1;
|
65
|
+
}, s = (r) => {
|
66
|
+
const a = d.uploadedImages[p.value];
|
67
|
+
a.fileUrl = r, a.fileName = Date.now(), m("onEditImage", { ...a, index: p.value }), f.value = !1, p.value = "", F.value = {};
|
68
|
+
}, t = (r) => {
|
69
|
+
let a = d.uploadedImages[p.value];
|
70
|
+
Object.keys(r).forEach((c) => {
|
71
|
+
a[c] = r[c];
|
72
|
+
}), m("update:uploadedImages", d.uploadedImages);
|
73
|
+
}, l = (r) => {
|
74
|
+
let a = d.uploadedImages.length + r.target.files.length > d.maxImages;
|
75
|
+
if (d.maxImages && a) {
|
76
|
+
m("onMaxFileExceed", a);
|
77
|
+
return;
|
78
|
+
}
|
79
|
+
m("change", r);
|
80
|
+
}, E = P(
|
81
|
+
() => d.maxImages == null || d.maxImages && d.uploadedImages.length < d.maxImages
|
82
|
+
), R = (r, a) => {
|
83
|
+
var c;
|
84
|
+
p.value = r, (c = d.inputOptions) == null || c.forEach((g) => {
|
85
|
+
F.value[g] = a[g];
|
86
|
+
}), b[r] = !1, f.value = !0;
|
87
|
+
};
|
88
|
+
return (r, a) => (o(), u("div", Y, [
|
89
|
+
E.value ? (o(), u("label", Z, [
|
90
|
+
i("div", _, [
|
91
|
+
v(n(I), { name: "plus" })
|
92
|
+
]),
|
93
|
+
O.value ? k("", !0) : (o(), u("input", {
|
94
|
+
key: 0,
|
95
|
+
class: "hidden",
|
96
|
+
type: "file",
|
97
|
+
accept: e.accept || "image/png, image/jpeg",
|
98
|
+
multiple: d.maxImages !== 1,
|
99
|
+
onChange: l
|
100
|
+
}, null, 40, ee))
|
101
|
+
])) : k("", !0),
|
102
|
+
(o(), B(n(W), {
|
103
|
+
key: e.uploadedImages.length,
|
104
|
+
"model-value": e.uploadedImages,
|
105
|
+
filter: "filtered-el",
|
106
|
+
class: "grid w-fit grid-cols-3 gap-3",
|
107
|
+
style: M(`grid-template-columns: repeat(${e.columnsCount}, 1fr)`),
|
108
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => r.$emit("update:uploadedImages", c))
|
109
|
+
}, {
|
110
|
+
default: D(({ list: c }) => [
|
111
|
+
(o(!0), u(A, null, T(c, (g, C) => (o(), u("div", {
|
112
|
+
key: g.fileName,
|
113
|
+
class: y(["w-[100px] group relative cursor-pointer aspect-square border rounded border-oc-accent-1-100 bg-cover bg-center", {
|
114
|
+
"border-oc-primary": e.selectedImage.fileName === g.fileName,
|
115
|
+
"col-start-2": C === 0 && E.value
|
116
|
+
}]),
|
117
|
+
style: M(`background-image: url(${g.fileUrl})`),
|
118
|
+
onClick: (j) => r.$emit("update:selectedImage", g)
|
119
|
+
}, [
|
120
|
+
v(n(G), {
|
121
|
+
modelValue: b.value[C],
|
122
|
+
"onUpdate:modelValue": (j) => b.value[C] = j,
|
123
|
+
placement: "bottom-end",
|
124
|
+
class: "absolute top-2 right-2 z-[1010] hidden group-hover:flex"
|
125
|
+
}, {
|
126
|
+
menu: D(() => [
|
127
|
+
N(r.$slots, "action", {
|
128
|
+
item: g,
|
129
|
+
removeItem: U,
|
130
|
+
fileIndex: C
|
131
|
+
}, () => [
|
132
|
+
i("div", le, [
|
133
|
+
i("div", {
|
134
|
+
class: "flex p-3 cursor-pointer items-center gap-x-3",
|
135
|
+
onClick: (j) => R(C, g)
|
136
|
+
}, [
|
137
|
+
v(n(I), {
|
138
|
+
width: "16",
|
139
|
+
height: "16",
|
140
|
+
name: "pencil"
|
141
|
+
}),
|
142
|
+
a[4] || (a[4] = i("span", null, "Edit Image", -1))
|
143
|
+
], 8, ae),
|
144
|
+
i("div", {
|
145
|
+
class: "flex p-3 cursor-pointer items-center text-oc-error gap-x-3",
|
146
|
+
onClick: () => {
|
147
|
+
U(C), b.value[C] = !1;
|
148
|
+
}
|
149
|
+
}, [
|
150
|
+
v(n(I), {
|
151
|
+
width: "16",
|
152
|
+
height: "16",
|
153
|
+
name: "bin"
|
154
|
+
}),
|
155
|
+
a[5] || (a[5] = i("span", null, "Delete", -1))
|
156
|
+
], 8, oe)
|
157
|
+
])
|
158
|
+
])
|
159
|
+
]),
|
160
|
+
default: D(() => [
|
161
|
+
v(n(I), {
|
162
|
+
name: "dots-vertical",
|
163
|
+
class: "absolute right-0 cursor-pointer w-[32px] flex h-[32px] items-center justify-center text-oc-bg-light"
|
164
|
+
})
|
165
|
+
]),
|
166
|
+
_: 2
|
167
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]),
|
168
|
+
i("div", {
|
169
|
+
class: y(["absolute transition-all duration-500 top-0 left-0 flex items-center justify-center w-full h-full", g.progress !== 100 ? "bg-black/[.35]" : "bg-black/0"])
|
170
|
+
}, [
|
171
|
+
i("div", {
|
172
|
+
class: y(["h-[6px] w-[72px] bg-white transition-all rounded-full", { "on-end-loading opacity-0": g.progress === 100 }])
|
173
|
+
}, [
|
174
|
+
i("div", {
|
175
|
+
class: "h-full bg-oc-primary rounded-full w-0 transition-all duration-500",
|
176
|
+
style: M({ width: `${g.progress || 0}%` })
|
177
|
+
}, null, 4)
|
178
|
+
], 2)
|
179
|
+
], 2),
|
180
|
+
i("div", ne, [
|
181
|
+
d.maxImages !== 1 ? (o(), u("span", ie, [
|
182
|
+
v(n(I), {
|
183
|
+
name: "arrows",
|
184
|
+
class: "text-oc-accent-1-50"
|
185
|
+
})
|
186
|
+
])) : k("", !0)
|
187
|
+
])
|
188
|
+
], 14, te))), 128))
|
189
|
+
]),
|
190
|
+
_: 3
|
191
|
+
}, 8, ["model-value", "style"])),
|
192
|
+
f.value ? (o(), B(n(Q), {
|
193
|
+
key: 1,
|
194
|
+
modelValue: f.value,
|
195
|
+
"onUpdate:modelValue": a[1] || (a[1] = (c) => f.value = c),
|
196
|
+
img: h.value,
|
197
|
+
"input-options": e.inputOptions,
|
198
|
+
"input-option-values": F.value,
|
199
|
+
onClose: a[2] || (a[2] = () => {
|
200
|
+
f.value = !1, p.value = "";
|
201
|
+
}),
|
202
|
+
onChangeImage: s,
|
203
|
+
"onUpdate:inputOptions": t
|
204
|
+
}, null, 8, ["modelValue", "img", "input-options", "input-option-values"])) : k("", !0),
|
205
|
+
v(n(X), {
|
206
|
+
modelValue: $.value,
|
207
|
+
"onUpdate:modelValue": a[3] || (a[3] = (c) => $.value = c),
|
208
|
+
description: "Do you want to delete this image ?",
|
209
|
+
onConfirm: S
|
210
|
+
}, null, 8, ["modelValue"])
|
211
|
+
]));
|
212
|
+
}
|
213
|
+
}, re = { class: "flex flex-col gap-y-2" }, de = ["accept"], ue = { class: "input-file-uploaded flex flex-col gap-y-3" }, ce = { class: "flex items-center gap-x-3" }, me = { class: "flex flex-col items-center justify-center text-oc-text-300" }, pe = { class: "uppercase text-[8px] font-bold leading-none block" }, ge = { class: "text-oc-text-400 text-sm" }, fe = { class: "w-[100px] h-[6px] bg-oc-accent-1-50 rounded-full overflow-hidden transition-all duration-1000" }, ve = ["accept"], xe = {
|
214
|
+
key: 1,
|
215
|
+
class: "w-full text-oc-text-300 text-sm h-full flex-1 flex flex-col justify-center items-center my-auto min-h-[120px] transition-all duration-300 gap-2"
|
216
|
+
}, be = { key: 0 }, he = { key: 1 }, ye = {
|
217
|
+
key: 2,
|
218
|
+
class: "text-center"
|
219
|
+
}, Ie = {
|
220
|
+
key: 2,
|
221
|
+
class: "mt-3 flex items-center justify-center"
|
222
|
+
}, ze = {
|
223
|
+
__name: "OcMultipleUploadFile",
|
224
|
+
props: {
|
225
|
+
modelValue: {
|
226
|
+
type: Array,
|
227
|
+
default: () => []
|
228
|
+
},
|
229
|
+
accept: {
|
230
|
+
type: String,
|
231
|
+
default: ""
|
232
|
+
},
|
233
|
+
validateAcceptFileType: Boolean,
|
234
|
+
/**
|
235
|
+
* Maximum file size in MB
|
236
|
+
*/
|
237
|
+
maxSize: Number,
|
238
|
+
maxImages: Number,
|
239
|
+
hint: String,
|
240
|
+
label: String,
|
241
|
+
errorMessage: String,
|
242
|
+
isImageOnly: Boolean,
|
243
|
+
columnsCount: Number,
|
244
|
+
selectedImage: {
|
245
|
+
type: Object,
|
246
|
+
default: () => ({})
|
247
|
+
},
|
248
|
+
inputOptions: Array,
|
249
|
+
isDisabled: Boolean,
|
250
|
+
labelUploadArea: String,
|
251
|
+
isButtonOnly: Boolean,
|
252
|
+
buttonUploadProps: {
|
253
|
+
type: Object,
|
254
|
+
default: () => ({
|
255
|
+
label: "Upload"
|
256
|
+
})
|
257
|
+
}
|
258
|
+
},
|
259
|
+
emits: [
|
260
|
+
"update:modelValue",
|
261
|
+
"update:selectedImage",
|
262
|
+
"onEditFile",
|
263
|
+
"onRemoveFile",
|
264
|
+
"onExceedMaxFileSize",
|
265
|
+
"onMaxFileExceed"
|
266
|
+
],
|
267
|
+
setup(e, { emit: z }) {
|
268
|
+
const d = z, m = e, b = x(), f = x(!1), p = x(!1), { isErrorMaxSize: F, currentFiles: h, onChangeFile: $, onDeleteFile: w } = K(
|
269
|
+
m.maxSize,
|
270
|
+
d,
|
271
|
+
m.accept,
|
272
|
+
m.validateAcceptFileType
|
273
|
+
);
|
274
|
+
L(() => {
|
275
|
+
const s = [];
|
276
|
+
m.modelValue.length > 0 && (m.modelValue.forEach((t) => {
|
277
|
+
t.current && s.push({
|
278
|
+
current: t.current,
|
279
|
+
file: null,
|
280
|
+
fileName: t.current.caption ?? "",
|
281
|
+
progress: 100,
|
282
|
+
fileUrl: t.current.path,
|
283
|
+
totalSize: t.current.file_size ?? 0,
|
284
|
+
isLoaded: !0,
|
285
|
+
extension: t.current.extension ?? "png",
|
286
|
+
description: t.current.description,
|
287
|
+
link: t.current.link,
|
288
|
+
caption: t.current.caption,
|
289
|
+
caption_variant: t.current.caption_variant,
|
290
|
+
lightbox: t.current.lightbox
|
291
|
+
});
|
292
|
+
}), h.value = s);
|
293
|
+
});
|
294
|
+
const U = (s) => {
|
295
|
+
p.value = !0, $(s);
|
296
|
+
}, O = (s) => {
|
297
|
+
p.value = !1, w(s);
|
298
|
+
}, S = () => {
|
299
|
+
var s;
|
300
|
+
(s = b.value) == null || s.click();
|
301
|
+
};
|
302
|
+
return (s, t) => (o(), u("div", re, [
|
303
|
+
v(n(H), {
|
304
|
+
label: e.label,
|
305
|
+
hint: e.hint,
|
306
|
+
"error-message": n(F) ? `File(s) is more than ${e.maxSize}MB` : e.errorMessage
|
307
|
+
}, {
|
308
|
+
hint: D(() => [
|
309
|
+
N(s.$slots, "hint")
|
310
|
+
]),
|
311
|
+
default: D(() => [
|
312
|
+
e.isImageOnly ? (o(), B(se, {
|
313
|
+
key: 0,
|
314
|
+
"uploaded-images": n(h),
|
315
|
+
"selected-image": e.selectedImage,
|
316
|
+
"columns-count": e.columnsCount,
|
317
|
+
accept: e.accept,
|
318
|
+
"input-options": e.inputOptions,
|
319
|
+
"max-images": e.maxImages,
|
320
|
+
onChange: n($),
|
321
|
+
"onUpdate:selectedImage": t[0] || (t[0] = (l) => s.$emit("update:selectedImage", l)),
|
322
|
+
"onUpdate:uploadedImages": t[1] || (t[1] = (l) => {
|
323
|
+
h.value = l, s.$emit("update:modelValue", l);
|
324
|
+
}),
|
325
|
+
onOnEditImage: t[2] || (t[2] = (l) => s.$emit("onEditFile", l)),
|
326
|
+
onOnRemoveImage: t[3] || (t[3] = (l) => s.$emit("onRemoveFile", l)),
|
327
|
+
onDelete: n(w),
|
328
|
+
onOnMaxFileExceed: t[4] || (t[4] = (l) => s.$emit("onMaxFileExceed", l))
|
329
|
+
}, {
|
330
|
+
action: D((l) => [
|
331
|
+
N(s.$slots, "action", {
|
332
|
+
item: l.item,
|
333
|
+
removeItem: l.removeItem,
|
334
|
+
fileIndex: l.i
|
335
|
+
})
|
336
|
+
]),
|
337
|
+
_: 3
|
338
|
+
}, 8, ["uploaded-images", "selected-image", "columns-count", "accept", "input-options", "max-images", "onChange", "onDelete"])) : e.isButtonOnly ? (o(), u(A, { key: 1 }, [
|
339
|
+
N(s.$slots, "button", { triggerInput: S }, () => [
|
340
|
+
v(n(J), q(e.buttonUploadProps, { onClick: S }), null, 16)
|
341
|
+
]),
|
342
|
+
i("input", {
|
343
|
+
id: "my-file",
|
344
|
+
ref_key: "inputRef",
|
345
|
+
ref: b,
|
346
|
+
class: "hidden",
|
347
|
+
type: "file",
|
348
|
+
multiple: "",
|
349
|
+
accept: e.accept,
|
350
|
+
onChange: U
|
351
|
+
}, null, 40, de)
|
352
|
+
], 64)) : (o(), u("div", {
|
353
|
+
key: 2,
|
354
|
+
class: y(["relative border rounded p-3 min-w-[30rem] flex flex-col", [
|
355
|
+
n(F) || e.errorMessage ? "border-oc-error" : "border-oc-gray-200",
|
356
|
+
{
|
357
|
+
"bg-oc-bg-dark": e.isDisabled
|
358
|
+
}
|
359
|
+
]])
|
360
|
+
}, [
|
361
|
+
i("div", ue, [
|
362
|
+
(o(!0), u(A, null, T(n(h), (l, E) => (o(), u("div", {
|
363
|
+
key: `${E}-${l.fileName}`,
|
364
|
+
class: "flex justify-between relative items-center w-full last:mb-2"
|
365
|
+
}, [
|
366
|
+
i("div", ce, [
|
367
|
+
i("div", me, [
|
368
|
+
v(n(I), {
|
369
|
+
name: "file-extension",
|
370
|
+
width: "14",
|
371
|
+
height: "10"
|
372
|
+
}),
|
373
|
+
i("span", pe, V(l.extension), 1)
|
374
|
+
]),
|
375
|
+
i("span", ge, V(l == null ? void 0 : l.fileName), 1)
|
376
|
+
]),
|
377
|
+
p.value ? (o(), u("div", {
|
378
|
+
key: 0,
|
379
|
+
class: y(["w-[100px] h-[16px] absolute right-0 flex items-center z-40", { "on-end-loading": l.progress === 100 }])
|
380
|
+
}, [
|
381
|
+
i("div", fe, [
|
382
|
+
i("div", {
|
383
|
+
style: M({ width: `${l.progress}%` }),
|
384
|
+
class: "block transition-all duration-1000 h-[6px] rounded-full bg-oc-primary"
|
385
|
+
}, null, 4)
|
386
|
+
])
|
387
|
+
], 2)) : k("", !0),
|
388
|
+
e.isDisabled ? k("", !0) : (o(), B(n(I), {
|
389
|
+
key: 1,
|
390
|
+
width: "12",
|
391
|
+
height: "12",
|
392
|
+
name: "bin",
|
393
|
+
class: y(["opacity-0 text-oc-error cursor-pointer absolute right-0", {
|
394
|
+
"on-enable-delete": l.progress === 100 && p.value,
|
395
|
+
"opacity-100": !p.value
|
396
|
+
}]),
|
397
|
+
onClick: (R) => O(E)
|
398
|
+
}, null, 8, ["class", "onClick"]))
|
399
|
+
]))), 128))
|
400
|
+
]),
|
401
|
+
i("label", {
|
402
|
+
tabindex: "0",
|
403
|
+
for: "my-file",
|
404
|
+
class: y(["relative overflow-hidden rounded-sm flex-1 flex flex-col transition-all border-transparent border-dashed hover:border-oc-primary", {
|
405
|
+
"!border-oc-primary": f.value && !e.isDisabled,
|
406
|
+
border: !n(h).length,
|
407
|
+
"cursor-pointer": !e.isDisabled
|
408
|
+
}])
|
409
|
+
}, [
|
410
|
+
e.isDisabled ? k("", !0) : (o(), u("input", {
|
411
|
+
key: 0,
|
412
|
+
id: "my-file",
|
413
|
+
ref_key: "inputRef",
|
414
|
+
ref: b,
|
415
|
+
class: "w-full h-full absolute opacity-0 cursor-pointer",
|
416
|
+
type: "file",
|
417
|
+
multiple: "",
|
418
|
+
accept: e.accept,
|
419
|
+
onDragover: t[5] || (t[5] = (l) => f.value = !0),
|
420
|
+
onDragleave: t[6] || (t[6] = (l) => f.value = !1),
|
421
|
+
onDrop: t[7] || (t[7] = (l) => f.value = !1),
|
422
|
+
onChange: U
|
423
|
+
}, null, 40, ve)),
|
424
|
+
n(h).length ? e.isDisabled ? k("", !0) : (o(), u("div", Ie, t[9] || (t[9] = [
|
425
|
+
i("span", { class: "text-oc-accent-1 text-sm" }, "+ Add more", -1)
|
426
|
+
]))) : (o(), u("div", xe, [
|
427
|
+
v(n(I), {
|
428
|
+
name: "upload",
|
429
|
+
class: y(e.isDisabled ? "text-oc-accent-1-200" : "text-oc-accent-1")
|
430
|
+
}, null, 8, ["class"]),
|
431
|
+
e.labelUploadArea ? (o(), u("div", be, V(e.labelUploadArea), 1)) : e.isDisabled ? (o(), u("div", he, "Upload disabled")) : (o(), u("div", ye, [
|
432
|
+
t[8] || (t[8] = i("div", null, "Select documents or drag here", -1)),
|
433
|
+
i("div", null, "File max " + V(e.maxSize) + "MB", 1)
|
434
|
+
]))
|
435
|
+
]))
|
436
|
+
], 2)
|
437
|
+
], 2))
|
438
|
+
]),
|
439
|
+
_: 3
|
440
|
+
}, 8, ["label", "hint", "error-message"])
|
441
|
+
]));
|
442
|
+
}
|
443
|
+
};
|
444
|
+
export {
|
445
|
+
ze as _
|
446
|
+
};
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { defineComponent as f, openBlock as g, createBlock as x, unref as l, withCtx as V, createElementVNode as n, normalizeClass as r, createVNode as s } from "vue";
|
2
|
+
import "dayjs";
|
3
|
+
import { _ as k, B as u } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
|
4
|
+
/* empty css */
|
5
|
+
import "libphonenumber-js";
|
6
|
+
/* empty css */
|
7
|
+
import "v-calendar";
|
8
|
+
/* empty css */
|
9
|
+
import "./Cropper.js";
|
10
|
+
import "vue-draggable-next";
|
11
|
+
import "@popperjs/core";
|
12
|
+
const h = ["value"], j = /* @__PURE__ */ f({
|
13
|
+
__name: "OcNumberInput",
|
14
|
+
props: {
|
15
|
+
modelValue: {
|
16
|
+
type: [String, Number],
|
17
|
+
default: null
|
18
|
+
},
|
19
|
+
minValue: {
|
20
|
+
type: Number,
|
21
|
+
default: 1
|
22
|
+
},
|
23
|
+
label: String,
|
24
|
+
errorMessage: String,
|
25
|
+
isDisabled: Boolean,
|
26
|
+
tooltipOptions: Object,
|
27
|
+
hint: String,
|
28
|
+
labelIcon: String,
|
29
|
+
isRequired: Boolean,
|
30
|
+
tooltipText: String,
|
31
|
+
inputClass: [String, Array, Object]
|
32
|
+
},
|
33
|
+
emits: ["update:modelValue"],
|
34
|
+
setup(e, { emit: m }) {
|
35
|
+
const i = e, o = m, d = () => o("update:modelValue", Number(i.modelValue) + 1), c = () => {
|
36
|
+
Number(i.modelValue) > i.minValue && o("update:modelValue", Number(i.modelValue) - 1);
|
37
|
+
}, b = (t) => {
|
38
|
+
t.key >= "0" && t.key <= "9" || t.key === "Backspace" || t.preventDefault();
|
39
|
+
};
|
40
|
+
return (t, a) => (g(), x(l(k), {
|
41
|
+
label: e.label,
|
42
|
+
"tooltip-options": e.tooltipOptions,
|
43
|
+
"error-message": e.errorMessage,
|
44
|
+
hint: e.hint,
|
45
|
+
"label-icon": e.labelIcon,
|
46
|
+
"is-required": e.isRequired,
|
47
|
+
"tooltip-text": e.tooltipText
|
48
|
+
}, {
|
49
|
+
default: V(() => [
|
50
|
+
n("div", {
|
51
|
+
class: r(["flex justify-between gap-x-3 h-[36px] items-center border rounded px-1", [
|
52
|
+
e.inputClass,
|
53
|
+
e.isDisabled ? "bg-oc-bg-dark" : "",
|
54
|
+
e.errorMessage ? "border-oc-error" : "border-oc-gray-200"
|
55
|
+
]])
|
56
|
+
}, [
|
57
|
+
s(l(u), {
|
58
|
+
variant: "secondary",
|
59
|
+
class: "w-[28px] shrink-0 aspect-square",
|
60
|
+
size: "small",
|
61
|
+
"icon-class": "shrink-0",
|
62
|
+
"is-disabled": e.isDisabled,
|
63
|
+
"left-icon": "minus",
|
64
|
+
onClick: c
|
65
|
+
}, null, 8, ["is-disabled"]),
|
66
|
+
n("input", {
|
67
|
+
value: e.modelValue,
|
68
|
+
class: r([e.modelValue ? "font-medium" : "text-oc-text-300", "outline-none text-center max-w-[calc(100%-76px)] bg-transparent"]),
|
69
|
+
placeholder: "1",
|
70
|
+
onKeydown: b,
|
71
|
+
onInput: a[0] || (a[0] = (p) => t.$emit("update:modelValue", p.target.value))
|
72
|
+
}, null, 42, h),
|
73
|
+
s(l(u), {
|
74
|
+
variant: "secondary",
|
75
|
+
class: "w-[28px] shrink-0 aspect-square",
|
76
|
+
size: "small",
|
77
|
+
"icon-class": "shrink-0",
|
78
|
+
"is-disabled": e.isDisabled,
|
79
|
+
"left-icon": "plus",
|
80
|
+
onClick: d
|
81
|
+
}, null, 8, ["is-disabled"])
|
82
|
+
], 2)
|
83
|
+
]),
|
84
|
+
_: 1
|
85
|
+
}, 8, ["label", "tooltip-options", "error-message", "hint", "label-icon", "is-required", "tooltip-text"]));
|
86
|
+
}
|
87
|
+
});
|
88
|
+
export {
|
89
|
+
j as _
|
90
|
+
};
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { defineComponent as a, openBlock as e, createElementBlock as i, createElementVNode as o, createVNode as c, unref as n, toDisplayString as s, renderSlot as l, createBlock as d, mergeProps as p, createCommentVNode as u } from "vue";
|
2
|
+
import "dayjs";
|
3
|
+
import { B as f } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
|
4
|
+
import { _ as m } from "./OcIcon-CJgBICxh.js";
|
5
|
+
/* empty css */
|
6
|
+
import "libphonenumber-js";
|
7
|
+
/* empty css */
|
8
|
+
import "v-calendar";
|
9
|
+
/* empty css */
|
10
|
+
import "./Cropper.js";
|
11
|
+
import "vue-draggable-next";
|
12
|
+
import "@popperjs/core";
|
13
|
+
const x = { class: "bg-oc-bg-light py-5 px-7 gap-x-7 flex items-center" }, h = { class: "flex-1 flex gap-x-4 items-center" }, g = {
|
14
|
+
key: 0,
|
15
|
+
class: "w-[24px] h-[24px] min-w-[24px] flex items-center text-white justify-center rounded-full bg-oc-primary"
|
16
|
+
}, y = {
|
17
|
+
key: 1,
|
18
|
+
class: "w-[24px] h-[24px] min-w-[24px] flex items-center justify-center border rounded-full text-oc-warning border-oc-warning"
|
19
|
+
}, b = {
|
20
|
+
key: 2,
|
21
|
+
class: "w-[24px] h-[24px] min-w-[24px] text-oc-text-300 text-sm font-medium flex items-center justify-center border rounded-full border-oc-gray-200"
|
22
|
+
}, _ = { class: "flex flex-col gap-y-1" }, w = { class: "font-medium" }, k = { class: "text-oc-text-300 text-sm" }, P = /* @__PURE__ */ a({
|
23
|
+
__name: "OcOnboardingListItem",
|
24
|
+
props: {
|
25
|
+
title: {
|
26
|
+
type: String,
|
27
|
+
default: ""
|
28
|
+
},
|
29
|
+
description: {
|
30
|
+
type: String,
|
31
|
+
default: ""
|
32
|
+
},
|
33
|
+
buttonOptions: {
|
34
|
+
type: Object,
|
35
|
+
default: () => ({})
|
36
|
+
},
|
37
|
+
status: {
|
38
|
+
type: String,
|
39
|
+
default: ""
|
40
|
+
},
|
41
|
+
number: {
|
42
|
+
type: Number,
|
43
|
+
default: 1
|
44
|
+
},
|
45
|
+
isButtonVisible: {
|
46
|
+
type: Boolean,
|
47
|
+
default: !0
|
48
|
+
}
|
49
|
+
},
|
50
|
+
setup(t) {
|
51
|
+
return (r, B) => (e(), i("div", x, [
|
52
|
+
o("div", h, [
|
53
|
+
t.status === "completed" ? (e(), i("div", g, [
|
54
|
+
c(n(m), {
|
55
|
+
name: "check-2",
|
56
|
+
width: "12",
|
57
|
+
height: "12"
|
58
|
+
})
|
59
|
+
])) : t.status === "pending" ? (e(), i("div", y, [
|
60
|
+
c(n(m), {
|
61
|
+
name: "time-filled",
|
62
|
+
width: "18",
|
63
|
+
height: "18"
|
64
|
+
})
|
65
|
+
])) : (e(), i("div", b, s(t.number), 1)),
|
66
|
+
o("div", _, [
|
67
|
+
l(r.$slots, "default", {}, () => [
|
68
|
+
o("span", w, s(t.title), 1),
|
69
|
+
o("span", k, s(t.description), 1)
|
70
|
+
])
|
71
|
+
])
|
72
|
+
]),
|
73
|
+
l(r.$slots, "action", {}, () => [
|
74
|
+
t.isButtonVisible ? (e(), d(n(f), p({ key: 0 }, t.buttonOptions, { class: "shrink-0" }), null, 16)) : u("", !0)
|
75
|
+
])
|
76
|
+
]));
|
77
|
+
}
|
78
|
+
});
|
79
|
+
export {
|
80
|
+
P as _
|
81
|
+
};
|