@orchidui/core 1.8.1-41 → 1.8.1-43

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.
Files changed (82) hide show
  1. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +1 -1
  2. package/dist/DataDisplay/FloatContent/OcFloatContent.js +1 -1
  3. package/dist/DataDisplay/InfoCard/OcInfoCard.js +1 -1
  4. package/dist/DataDisplay/ListDetail/OcListDetail.js +1 -1
  5. package/dist/DataDisplay/ListItem/OcListItem.js +1 -1
  6. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +1 -1
  7. package/dist/DataDisplay/Overview/OcOverview.js +1 -1
  8. package/dist/DataDisplay/Pagination/OcPagination.js +1 -1
  9. package/dist/DataDisplay/Table/OcTable.js +1 -1
  10. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +1 -1
  11. package/dist/Disclosure/Accordion/OcAccordion.js +1 -1
  12. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +1 -1
  13. package/dist/Disclosure/Steps/OcSteps.js +1 -1
  14. package/dist/Disclosure/Tabs/Tabs.js +1 -1
  15. package/dist/Disclosure/Variants/OcVariants.js +1 -1
  16. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +1 -1
  17. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +1 -1
  18. package/dist/Elements/Box/OcBox.js +1 -1
  19. package/dist/Elements/EmptyPage/OcEmptyPage.js +1 -1
  20. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +1 -1
  21. package/dist/Elements/Header/OcHeader.js +1 -1
  22. package/dist/Elements/PageTitle/OcPageTitle.js +1 -1
  23. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +1 -1
  24. package/dist/Elements/Sidebar/OcSidebar.js +2 -2
  25. package/dist/Elements/SubSidebar/OcSubSidebar.js +1 -1
  26. package/dist/Elements/VerificationOption/OcVerificationOption.js +1 -1
  27. package/dist/Feedback/Banner/OcBanner.js +1 -1
  28. package/dist/Feedback/Chip/OcChip.js +1 -1
  29. package/dist/Feedback/ShareIcon/OcShareIcon.js +1 -1
  30. package/dist/Feedback/Snackbar/OcSnackbar.js +1 -1
  31. package/dist/Form/BaseInput/OcBaseInput.js +1 -1
  32. package/dist/Form/Button/OcButton.js +1 -1
  33. package/dist/Form/Calendar/OcCalendar.js +1 -1
  34. package/dist/Form/CardInput/OcCardInput.js +1 -1
  35. package/dist/Form/Checkbox/OcCheckbox.js +1 -1
  36. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +1 -1
  37. package/dist/Form/Criteria/OcCriteria.js +1 -1
  38. package/dist/Form/Cropper/OcCropper.js +1 -1
  39. package/dist/Form/DatePicker/OcDatePicker.js +1 -1
  40. package/dist/Form/EmojiPicker/OcEmojiPicker.js +1 -1
  41. package/dist/Form/Input/OcInput.js +1 -1
  42. package/dist/Form/LinkInput/OcLinkInput.js +1 -1
  43. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +1 -1
  44. package/dist/Form/NumberInput/OcNumberInput.js +1 -1
  45. package/dist/Form/PhoneInput/OcPhoneInput.js +1 -1
  46. package/dist/Form/Radio/OcRadio.js +1 -1
  47. package/dist/Form/RadioGroup/OcRadioGroup.js +1 -1
  48. package/dist/Form/RangeInput/OcRangeInput.js +1 -1
  49. package/dist/Form/SectionItem/OcSectionItem.js +1 -1
  50. package/dist/Form/Select/OcSelect.js +1 -1
  51. package/dist/Form/SelectOptions/OcSelectOptions.js +1 -1
  52. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +1 -1
  53. package/dist/Form/Slider/OcSlider.js +1 -1
  54. package/dist/Form/TextArea/OcTextArea.js +1 -1
  55. package/dist/Form/index.js +1 -1
  56. package/dist/FormBuilder/OcFormBuilder.js +1 -1
  57. package/dist/{OcAccountSetupProgress-CfK4DhqI.js → OcAccountSetupProgress-BpUSPSgy.js} +1 -1
  58. package/dist/{OcComplexCalendar-D30GXpy2.js → OcComplexCalendar-M-R7nJ_F.js} +1 -1
  59. package/dist/{OcComplexDatePicker-DD8DOHif.js → OcComplexDatePicker-B1LHCooA.js} +1 -1
  60. package/dist/OcCropper-D2MLFJ36.js +261 -0
  61. package/dist/{OcDataTable-Cf6wmJW2.js → OcDataTable-DMdeu9Hk.js} +111 -111
  62. package/dist/{OcDraggableList-pK7klIYI.js → OcDraggableList-CaYtyyAP.js} +1 -1
  63. package/dist/{OcEmojiPicker-D886B8hz.js → OcEmojiPicker-CPekE3el.js} +1 -1
  64. package/dist/{OcFilterForm-UrEVxZtW.js → OcFilterForm-BBlBpRcW.js} +1 -1
  65. package/dist/{OcFilterSearch-CKWJ4B9S.js → OcFilterSearch-YyT-YC4l.js} +1 -1
  66. package/dist/{OcFilterSearchFor-GT6XYg1R.js → OcFilterSearchFor-D1fCnVUv.js} +1 -1
  67. package/dist/{OcModalCropper-CJmBDGca.js → OcModalCropper-BcmV05IW.js} +2 -2
  68. package/dist/{OcTimePicker-DYD2uUuY.js → OcTimePicker-CXSOXNEM.js} +1 -1
  69. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +1 -1
  70. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +1 -1
  71. package/dist/Overlay/Dropdown/OcDropdown.js +1 -1
  72. package/dist/Overlay/Modal/OcModal.js +1 -1
  73. package/dist/Overlay/SupportMenu/OcSupportMenu.js +1 -1
  74. package/dist/Overlay/Tooltip/OcTooltip.js +1 -1
  75. package/dist/Overlay/Whitelist/OcWhiteList.js +1 -1
  76. package/dist/{SubPlanCard-DCaPD4sV.js → SubPlanCard-Dois1bOA.js} +1 -1
  77. package/dist/{ThumbnailSection-2wG4C9dw.js → ThumbnailSection-BWV4Uzv1.js} +1 -1
  78. package/dist/{ThumbnailTheme-GJ93fnL4.js → ThumbnailTheme-Bt2IvCF4.js} +1 -1
  79. package/dist/{index-DbinnvEU.js → index-CXleXdVl.js} +10 -9
  80. package/dist/index.js +1 -1
  81. package/package.json +1 -1
  82. package/dist/OcCropper-DhxFUxbJ.js +0 -232
@@ -0,0 +1,261 @@
1
+ import { ref as s, watch as T, nextTick as K, openBlock as n, createElementBlock as w, createElementVNode as f, createBlock as u, unref as a, Fragment as M, createVNode as d, createCommentVNode as r, withCtx as b } from "vue";
2
+ import { B as k, d as V, C as x, h as P, aD as j } from "./index-CXleXdVl.js";
3
+ import { Cropper as Q } from "vue-advanced-cropper";
4
+ import { _ as q } from "./OcIcon-CSpRxnwd.js";
5
+ const W = { class: "flex flex-col gap-y-5" }, X = ["src"], Y = { class: "flex gap-x-1 justify-center relative" }, Z = { class: "grid grid-cols-2 gap-4" }, ae = {
6
+ __name: "OcCropper",
7
+ props: {
8
+ inputOptions: Array,
9
+ inputOptionValues: Object,
10
+ img: String,
11
+ maxSize: [String, Number],
12
+ isReplaceImage: {
13
+ type: Boolean,
14
+ default: !0
15
+ }
16
+ },
17
+ emits: ["changeImage", "update:input-options"],
18
+ setup(i, { emit: F }) {
19
+ const g = i, y = F, m = s(), C = s(), p = s(""), O = s(), z = s(!1), o = s(g.inputOptionValues ?? {});
20
+ T(
21
+ () => g.inputOptionValues,
22
+ () => {
23
+ o.value = g.inputOptionValues;
24
+ },
25
+ {
26
+ deep: !0
27
+ }
28
+ ), T(
29
+ () => g.img,
30
+ (l) => {
31
+ l && K(() => {
32
+ try {
33
+ const e = new URL(l);
34
+ e.protocol === "http:" || e.protocol === "https:" ? p.value = `${l}?${Date.now()}` : p.value = l;
35
+ } catch {
36
+ p.value = l;
37
+ }
38
+ });
39
+ },
40
+ { immediate: !0 }
41
+ );
42
+ const A = () => {
43
+ if (p.value && z.value) {
44
+ const { canvas: l } = m.value.getResult(), e = !(m.value.image.width === l.width && m.value.image.height === l.height && !m.value.imageTransforms.rotate);
45
+ y("changeImage", l.toDataURL(), {
46
+ isChanged: e,
47
+ file: O.value
48
+ });
49
+ }
50
+ z.value = !0;
51
+ }, U = (l) => {
52
+ var e;
53
+ return (e = m.value) == null ? void 0 : e.rotate(l);
54
+ }, I = (l) => {
55
+ var e;
56
+ return (e = m.value) == null ? void 0 : e.zoom(l);
57
+ }, G = () => {
58
+ C.value.click();
59
+ }, H = (l) => {
60
+ if (l.target.files[0] / (1024 * 1024) > +g.maxSize)
61
+ return l.preventDefault(), !1;
62
+ O.value = l.target.files[0], p.value = URL.createObjectURL(l.target.files[0]);
63
+ }, J = ({ imageSize: l, visibleArea: e }) => ({
64
+ width: (e || l).width,
65
+ height: (e || l).height
66
+ }), c = (l, e) => {
67
+ let v = o.value;
68
+ v[l] = e, y("update:input-options", v);
69
+ }, h = s(!!o.value.caption), $ = s(!!o.value.lightbox), L = s(!!o.value.new_tab);
70
+ return (l, e) => {
71
+ var v, R, B, S, D, E, N;
72
+ return n(), w("div", W, [
73
+ f("input", {
74
+ id: "cropper-file-input",
75
+ ref_key: "fileUploadEl",
76
+ ref: C,
77
+ accept: "image/*",
78
+ type: "file",
79
+ class: "hidden",
80
+ onChange: H
81
+ }, null, 544),
82
+ p.value ? (n(), u(a(Q), {
83
+ key: 0,
84
+ ref_key: "cropper",
85
+ ref: m,
86
+ class: "w-full h-[300px]",
87
+ src: p.value,
88
+ "resize-image": { wheel: !1 },
89
+ "background-class": "cropper-background",
90
+ "default-size": J,
91
+ onChange: A
92
+ }, null, 8, ["src"])) : (n(), w("img", {
93
+ key: 1,
94
+ class: "w-full",
95
+ src: i.img
96
+ }, null, 8, X)),
97
+ f("div", Y, [
98
+ p.value ? (n(), w(M, { key: 0 }, [
99
+ d(a(k), {
100
+ variant: "secondary",
101
+ size: "small",
102
+ "left-icon": "backward",
103
+ onClick: e[0] || (e[0] = (t) => U(-90))
104
+ }),
105
+ d(a(k), {
106
+ variant: "secondary",
107
+ size: "small",
108
+ "left-icon": "zoom-out",
109
+ onClick: e[1] || (e[1] = (t) => I(0.8))
110
+ }),
111
+ d(a(k), {
112
+ variant: "secondary",
113
+ size: "small",
114
+ "left-icon": "zoom-in",
115
+ onClick: e[2] || (e[2] = (t) => I(1.2))
116
+ }),
117
+ d(a(k), {
118
+ variant: "secondary",
119
+ size: "small",
120
+ "left-icon": "forward",
121
+ onClick: e[3] || (e[3] = (t) => U(90))
122
+ })
123
+ ], 64)) : r("", !0),
124
+ i.isReplaceImage ? (n(), u(a(k), {
125
+ key: 1,
126
+ class: "absolute right-0",
127
+ variant: "secondary",
128
+ size: "small",
129
+ label: "Replace image",
130
+ "left-icon": "refresh",
131
+ onClick: G
132
+ })) : r("", !0)
133
+ ]),
134
+ f("div", Z, [
135
+ (v = i.inputOptions) != null && v.includes("description") ? (n(), u(a(V), {
136
+ key: 0,
137
+ modelValue: o.value.description,
138
+ "onUpdate:modelValue": [
139
+ e[4] || (e[4] = (t) => o.value.description = t),
140
+ e[5] || (e[5] = (t) => c("description", t))
141
+ ],
142
+ label: "Describe Image",
143
+ placeholder: ""
144
+ }, null, 8, ["modelValue"])) : r("", !0),
145
+ (R = i.inputOptions) != null && R.includes("link") ? (n(), u(a(V), {
146
+ key: 1,
147
+ modelValue: o.value.link,
148
+ "onUpdate:modelValue": [
149
+ e[6] || (e[6] = (t) => o.value.link = t),
150
+ e[7] || (e[7] = (t) => c("link", t))
151
+ ],
152
+ placeholder: "https://hitpayapp.com",
153
+ label: "Link to"
154
+ }, null, 8, ["modelValue"])) : r("", !0),
155
+ f("div", null, [
156
+ (B = i.inputOptions) != null && B.includes("caption") ? (n(), u(a(x), {
157
+ key: 0,
158
+ modelValue: h.value,
159
+ "onUpdate:modelValue": e[8] || (e[8] = (t) => h.value = t),
160
+ label: "Caption",
161
+ class: "mb-4"
162
+ }, null, 8, ["modelValue"])) : r("", !0),
163
+ (S = i.inputOptions) != null && S.includes("caption") && h.value ? (n(), u(a(V), {
164
+ key: 1,
165
+ modelValue: o.value.caption,
166
+ "onUpdate:modelValue": [
167
+ e[9] || (e[9] = (t) => o.value.caption = t),
168
+ e[10] || (e[10] = (t) => c("caption", t))
169
+ ],
170
+ class: "mb-4",
171
+ placeholder: ""
172
+ }, null, 8, ["modelValue"])) : r("", !0),
173
+ (D = i.inputOptions) != null && D.includes("caption") && h.value ? (n(), u(a(P), {
174
+ key: 2,
175
+ "model-value": o.value.caption_variant,
176
+ "group-name": "caption_variant",
177
+ alignment: "horizontal",
178
+ radio: [
179
+ {
180
+ value: "hover",
181
+ label: "Show on hover"
182
+ },
183
+ {
184
+ value: "bottom",
185
+ label: "Show on bottom"
186
+ }
187
+ ],
188
+ label: "Caption position",
189
+ "onUpdate:modelValue": e[11] || (e[11] = (t) => c("caption_variant", t))
190
+ }, null, 8, ["model-value"])) : r("", !0)
191
+ ]),
192
+ f("div", null, [
193
+ (E = i.inputOptions) != null && E.includes("new_tab") ? (n(), u(a(x), {
194
+ key: 0,
195
+ modelValue: L.value,
196
+ "onUpdate:modelValue": [
197
+ e[12] || (e[12] = (t) => L.value = t),
198
+ e[13] || (e[13] = (t) => c("new_tab", t))
199
+ ],
200
+ label: "Open link in a new tab",
201
+ class: "mb-4"
202
+ }, {
203
+ after: b(() => [
204
+ d(a(j), {
205
+ position: "bottom",
206
+ distance: 10,
207
+ "popper-class": "bg-oc-bg-light min-w-[125px]"
208
+ }, {
209
+ default: b(() => [
210
+ d(a(q), {
211
+ name: "question-mark",
212
+ width: "16",
213
+ height: "16",
214
+ class: "text-oc-accent-1-500"
215
+ })
216
+ ]),
217
+ _: 1
218
+ })
219
+ ]),
220
+ _: 1
221
+ }, 8, ["modelValue"])) : r("", !0),
222
+ (N = i.inputOptions) != null && N.includes("lightbox") ? (n(), u(a(x), {
223
+ key: 1,
224
+ modelValue: $.value,
225
+ "onUpdate:modelValue": [
226
+ e[14] || (e[14] = (t) => $.value = t),
227
+ e[15] || (e[15] = (t) => c("lightbox", t))
228
+ ],
229
+ label: "Enable lightbox"
230
+ }, {
231
+ after: b(() => [
232
+ d(a(j), {
233
+ position: "bottom",
234
+ distance: 10,
235
+ "popper-class": "bg-oc-bg-light min-w-[125px]"
236
+ }, {
237
+ popper: b(() => e[16] || (e[16] = [
238
+ f("div", { class: "text-oc-text-400 text-sm px-3 py-2 font-medium text-center" }, " Show lightbox when click the image ", -1)
239
+ ])),
240
+ default: b(() => [
241
+ d(a(q), {
242
+ name: "question-mark",
243
+ width: "16",
244
+ height: "16",
245
+ class: "text-oc-accent-1-500"
246
+ })
247
+ ]),
248
+ _: 1
249
+ })
250
+ ]),
251
+ _: 1
252
+ }, 8, ["modelValue"])) : r("", !0)
253
+ ])
254
+ ])
255
+ ]);
256
+ };
257
+ }
258
+ };
259
+ export {
260
+ ae as default
261
+ };