@orchidui/core 0.0.1 → 0.3.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.
Files changed (169) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/Calendar.js +103 -0
  4. package/dist/Cropper.js +6 -0
  5. package/dist/DataDisplay/CustomerCard/OcCustomerCard.js +4 -0
  6. package/dist/DataDisplay/FloatContent/OcFloatContent.js +4 -0
  7. package/dist/DataDisplay/HorizontalProgressbar/OcHorizontalProgressbar.js +4 -0
  8. package/dist/DataDisplay/InfoCard/OcInfoCard.js +4 -0
  9. package/dist/DataDisplay/ListDetail/OcListDetail.js +4 -0
  10. package/dist/DataDisplay/ListItem/OcListItem.js +5 -0
  11. package/dist/DataDisplay/OnboardingListItem/OcOnboardingListItem.js +4 -0
  12. package/dist/DataDisplay/Overview/OcOverview.js +7 -0
  13. package/dist/DataDisplay/Pagination/OcPagination.js +6 -0
  14. package/dist/DataDisplay/ProgressBar/OcProgressBar.js +4 -0
  15. package/dist/DataDisplay/Table/OcTable.js +11 -0
  16. package/dist/DataDisplay/TransferSummary/OcTransferSummary.js +4 -0
  17. package/dist/DatePicker-D3w435Ml.js +263 -0
  18. package/dist/Disclosure/Accordion/OcAccordion.js +4 -0
  19. package/dist/Disclosure/OnboardingAccordion/OnboardingAccordion.js +4 -0
  20. package/dist/Disclosure/Steps/OcSteps.js +5 -0
  21. package/dist/Disclosure/SwitchTabs/OcSwitchTabs.js +4 -0
  22. package/dist/Disclosure/Tabs/Tabs.js +5 -0
  23. package/dist/Disclosure/Variants/OcVariants.js +5 -0
  24. package/dist/Draggable.js +168 -0
  25. package/dist/Elements/AdditionalContent/OcAdditionalContent.js +5 -0
  26. package/dist/Elements/AuthenticationOption/AuthenticationOption.js +4 -0
  27. package/dist/Elements/Box/OcBox.js +4 -0
  28. package/dist/Elements/EmptyPage/OcEmptyPage.js +4 -0
  29. package/dist/Elements/FeatureOverviewCard/OcFeatureOverviewCard.js +4 -0
  30. package/dist/Elements/Header/OcHeader.js +9 -0
  31. package/dist/Elements/PageTitle/OcPageTitle.js +7 -0
  32. package/dist/Elements/SandboxBanner/OcSandboxBanner.js +4 -0
  33. package/dist/Elements/Sidebar/OcSidebar.js +6 -0
  34. package/dist/Elements/Skeleton/OcSkeleton.js +4 -0
  35. package/dist/Elements/SubSidebar/OcSubSidebar.js +4 -0
  36. package/dist/Elements/VerificationOption/OcVerificationOption.js +4 -0
  37. package/dist/EmojiPicker.js +4 -0
  38. package/dist/Feedback/Banner/OcBanner.js +4 -0
  39. package/dist/Feedback/Chip/OcChip.js +4 -0
  40. package/dist/Feedback/ShareIcon/OcShareIcon.js +4 -0
  41. package/dist/Feedback/Snackbar/OcSnackbar.js +4 -0
  42. package/dist/Feedback/Tag/OcTag.js +4 -0
  43. package/dist/Form/BaseInput/OcBaseInput.js +4 -0
  44. package/dist/Form/Button/OcButton.js +4 -0
  45. package/dist/Form/Calendar/OcCalendar.js +5 -0
  46. package/dist/Form/CardInput/OcCardInput.js +4 -0
  47. package/dist/Form/Checkbox/OcCheckbox.js +4 -0
  48. package/dist/Form/CheckboxesGroup/OcCheckboxesGroup.js +4 -0
  49. package/dist/Form/Criteria/OcCriteria.js +4 -0
  50. package/dist/Form/Cropper/OcCropper.js +4 -0
  51. package/dist/Form/DatePicker/OcDatePicker.js +4 -0
  52. package/dist/Form/EmojiPicker/OcEmojiPicker.js +4 -0
  53. package/dist/Form/EmojiPicker/conts/emoji.js +1030 -0
  54. package/dist/Form/Input/OcInput.js +6 -0
  55. package/dist/Form/LinkInput/OcLinkInput.js +4 -0
  56. package/dist/Form/MultipleUploadFile/OcMultipleUploadFile.js +4 -0
  57. package/dist/Form/NumberInput/OcNumberInput.js +4 -0
  58. package/dist/Form/PhoneInput/OcPhoneInput.js +4 -0
  59. package/dist/Form/Radio/OcRadio.js +4 -0
  60. package/dist/Form/RadioGroup/OcRadioGroup.js +4 -0
  61. package/dist/Form/RangeInput/OcRangeInput.js +4 -0
  62. package/dist/Form/SectionItem/OcSectionItem.js +4 -0
  63. package/dist/Form/Select/OcSelect.js +7 -0
  64. package/dist/Form/SelectOptions/OcSelectOptions.js +4 -0
  65. package/dist/Form/SingleFileUpload/OcSingleFileUpload.js +4 -0
  66. package/dist/Form/Slider/OcSlider.js +4 -0
  67. package/dist/Form/TextArea/OcTextArea.js +4 -0
  68. package/dist/Form/TimePicker/OcTimePicker.js +6 -0
  69. package/dist/Form/Toggle/OcToggle.js +4 -0
  70. package/dist/Form/index.js +54 -0
  71. package/dist/FormBuilder/OcFormBuilder.js +4 -0
  72. package/dist/MediaAndIcons/Avatar/OcAvatar.js +4 -0
  73. package/dist/MediaAndIcons/Icon/OcIcon.js +4 -0
  74. package/dist/OcAccordion-DdkNsXvN.js +101 -0
  75. package/dist/OcAccountSetup-BXDjf48o.js +324 -0
  76. package/dist/OcAdditionalContent-BMSysCXu.js +612 -0
  77. package/dist/OcAuthenticationOption.vue_vue_type_script_setup_true_lang-w5Y0ymGN.js +43 -0
  78. package/dist/OcAvatar-NDXQiZvz.js +41 -0
  79. package/dist/OcBanner-Cg2WJV6e.js +108 -0
  80. package/dist/OcBox.vue_vue_type_script_setup_true_lang-aB397QRg.js +43 -0
  81. package/dist/OcCardInput-BFE4Xu-S.js +75 -0
  82. package/dist/OcCheckboxesGroup-CLbquUO2.js +94 -0
  83. package/dist/OcChip-B1hm2Qni.js +144 -0
  84. package/dist/OcComplexCalendar-x-_kg9Yk.js +108 -0
  85. package/dist/OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js +1006 -0
  86. package/dist/OcConfirmationModal-BfCrRV9r.js +179 -0
  87. package/dist/OcCopyTooltip.vue_vue_type_script_setup_true_lang-S2RAfV_g.js +65 -0
  88. package/dist/OcCriteria-CpIohheZ.js +42 -0
  89. package/dist/OcCropper-31Y_S1Ne.js +240 -0
  90. package/dist/OcCustomerCard-DbDOBO03.js +160 -0
  91. package/dist/OcDraggable-BjhGJmpM.js +35 -0
  92. package/dist/OcDropdownItem-DAElmzEu.js +57 -0
  93. package/dist/OcEmojiPicker-BXm-_OGK.js +157 -0
  94. package/dist/OcEmptyPage-CTwgMzRp.js +155 -0
  95. package/dist/OcExpadingTable.vue_vue_type_script_setup_true_lang-B4HOMDBK.js +815 -0
  96. package/dist/OcFeatureOverviewCard-RVyrWLVW.js +71 -0
  97. package/dist/OcFloatContent-BIKQOxSw.js +142 -0
  98. package/dist/OcFormBuilder-CRXWtt8I.js +177 -0
  99. package/dist/OcGroupOptions-ChGJvTXl.js +16 -0
  100. package/dist/OcHorizontalProgressbar.vue_vue_type_script_setup_true_lang-4eVgPDi5.js +32 -0
  101. package/dist/OcIcon-CJgBICxh.js +63 -0
  102. package/dist/OcInfoCard-DpYUZOMZ.js +81 -0
  103. package/dist/OcInput-tcRxG3Y2.js +227 -0
  104. package/dist/OcInputOption-CncASfNt.js +160 -0
  105. package/dist/OcLinkInput-C2ixk-gk.js +143 -0
  106. package/dist/OcListDetail-6XeME6ko.js +76 -0
  107. package/dist/OcListUrl.vue_vue_type_script_setup_true_lang-BEJafLuT.js +749 -0
  108. package/dist/OcModal-DdD5VFEN.js +187 -0
  109. package/dist/OcModalCropper-D2OI2iun.js +56 -0
  110. package/dist/OcModalPage-BLVa-kcB.js +86 -0
  111. package/dist/OcMultipleUploadFile-B8Wl9Fuq.js +446 -0
  112. package/dist/OcNumberInput.vue_vue_type_script_setup_true_lang-C4EXUIUe.js +90 -0
  113. package/dist/OcOnboardingListItem.vue_vue_type_script_setup_true_lang-Cr80xmnz.js +81 -0
  114. package/dist/OcOption-DK2FBGq7.js +485 -0
  115. package/dist/OcOverviewIcon-D702Ujka.js +55 -0
  116. package/dist/OcOverviewItem-DNr5tWnt.js +186 -0
  117. package/dist/OcPageTitleRight-DMtJ1qmZ.js +243 -0
  118. package/dist/OcPaginationNumber-IKPorX26.js +172 -0
  119. package/dist/OcPaymentTab-Cna1IAhO.js +170 -0
  120. package/dist/OcPhoneInput-AC6BgQhN.js +432 -0
  121. package/dist/OcPopper-C11OgQAj.js +97 -0
  122. package/dist/OcPrimaryActions-D5IprKsQ.js +222 -0
  123. package/dist/OcProgressBar-hiyC5XSc.js +33 -0
  124. package/dist/OcRadio-CRYfNwV9.js +107 -0
  125. package/dist/OcRadioGroup-DgfdWJos.js +76 -0
  126. package/dist/OcRangeInput-C-hoHFhr.js +103 -0
  127. package/dist/OcSandboxBanner.vue_vue_type_script_setup_true_lang-BD0k_8xa.js +37 -0
  128. package/dist/OcSectionItem-BFgxO3se.js +84 -0
  129. package/dist/OcSelectOptions-BQlG_EUA.js +148 -0
  130. package/dist/OcShareIcon-BB-NPq0r.js +53 -0
  131. package/dist/OcSingleFileUpload-B8-e1H5t.js +464 -0
  132. package/dist/OcSkeleton-BdPTmGh0.js +13 -0
  133. package/dist/OcSlider-Bsi-ckbP.js +124 -0
  134. package/dist/OcSnackbar-CKxY1-ej.js +196 -0
  135. package/dist/OcSteps.vue_vue_type_script_setup_true_lang-CXGy8ma_.js +87 -0
  136. package/dist/OcSubSidebar.vue_vue_type_script_setup_true_lang-CNxgU07N.js +60 -0
  137. package/dist/OcSupportMenu.vue_vue_type_script_setup_true_lang-DrjZsWti.js +114 -0
  138. package/dist/OcSwitchTabs-CYp676bj.js +31 -0
  139. package/dist/OcTabToSelect-BHAz1Niv.js +183 -0
  140. package/dist/OcTag.vue_vue_type_script_setup_true_lang-D19lw-8Y.js +26 -0
  141. package/dist/OcTextArea-BpV1Bnj_.js +78 -0
  142. package/dist/OcTheme-CWgrJh5Q.js +25 -0
  143. package/dist/OcTimePicker-B61MCi0D.js +110 -0
  144. package/dist/OcTimePopup-zQFKCZLk.js +131 -0
  145. package/dist/OcToggle-C0wTjM_Y.js +54 -0
  146. package/dist/OcTransferSummary-Bk2GXhrT.js +67 -0
  147. package/dist/OcVariant.vue_vue_type_script_setup_true_lang-CY_82DLc.js +99 -0
  148. package/dist/OcVerificationOption.vue_vue_type_script_setup_true_lang-ChqvNoDe.js +59 -0
  149. package/dist/OcWhiteList.vue_vue_type_script_setup_true_lang-DI9pYU3w.js +64 -0
  150. package/dist/OnboardingAccordion.vue_vue_type_script_setup_true_lang-B0Z7ETmj.js +113 -0
  151. package/dist/Overlay/ConfirmationModal/OcConfirmationModal.js +4 -0
  152. package/dist/Overlay/CopyTooltip/OcCopyTooltip.js +4 -0
  153. package/dist/Overlay/Dropdown/OcDropdown.js +6 -0
  154. package/dist/Overlay/Modal/OcModal.js +6 -0
  155. package/dist/Overlay/Popper/OcPopper.js +4 -0
  156. package/dist/Overlay/SupportMenu/OcSupportMenu.js +4 -0
  157. package/dist/Overlay/Tooltip/OcTooltip.js +4 -0
  158. package/dist/Overlay/Whitelist/OcWhiteList.js +4 -0
  159. package/dist/StoreDesign.js +240 -0
  160. package/dist/Theme/OcTheme.js +4 -0
  161. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  162. package/dist/composables/helpers.js +48 -0
  163. package/dist/composables/uploadFileProgress.js +62 -0
  164. package/dist/composables/useWindowWidth.js +10 -0
  165. package/dist/data/Validator.js +5 -0
  166. package/dist/directives/clickOutside.js +13 -0
  167. package/dist/index.js +177 -1
  168. package/dist/style.css +1 -0
  169. package/package.json +23 -5
@@ -0,0 +1,227 @@
1
+ import { useAttrs as R, ref as c, computed as f, openBlock as i, createBlock as m, unref as y, createSlots as P, withCtx as v, createElementVNode as d, normalizeClass as x, createElementBlock as r, renderSlot as u, createCommentVNode as s, mergeProps as S, toDisplayString as $, withModifiers as V } from "vue";
2
+ import "dayjs";
3
+ import { _ as M } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
4
+ import { _ as k } 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 F = {
14
+ key: 0,
15
+ class: "border-r border-gray-200 pr-3 py-3"
16
+ }, L = { class: "flex flex-1 items-baseline gap-x-2" }, O = {
17
+ key: 0,
18
+ class: "text-oc-text-300"
19
+ }, T = { class: "flex items-center gap-x-1 w-full" }, q = {
20
+ key: 0,
21
+ class: "text-oc-text-300"
22
+ }, E = ["value", "readonly", "placeholder", "disabled", "autocomplete", "inputmode", "type"], X = {
23
+ __name: "OcInput",
24
+ props: {
25
+ disabled: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ errorMessage: {
30
+ type: String,
31
+ default: ""
32
+ },
33
+ iconProps: {
34
+ type: Object,
35
+ default: () => ({})
36
+ },
37
+ modelValue: {
38
+ type: [String, Number],
39
+ default: ""
40
+ },
41
+ label: {
42
+ type: String,
43
+ default: ""
44
+ },
45
+ hint: {
46
+ type: String,
47
+ default: ""
48
+ },
49
+ isInlineLabel: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ isReadonly: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ placeholder: {
58
+ type: String,
59
+ default: "Placeholder"
60
+ },
61
+ icon: {
62
+ type: String,
63
+ default: ""
64
+ },
65
+ inputType: {
66
+ type: String,
67
+ default: "text"
68
+ },
69
+ autocomplete: {
70
+ type: String,
71
+ default: "one-time-code"
72
+ },
73
+ preFill: {
74
+ type: String,
75
+ default: ""
76
+ },
77
+ hasError: {
78
+ type: Boolean,
79
+ default: !1
80
+ },
81
+ isRequired: {
82
+ type: Boolean,
83
+ default: !1
84
+ },
85
+ labelIcon: {
86
+ type: String,
87
+ default: ""
88
+ },
89
+ tooltipText: {
90
+ type: String,
91
+ default: ""
92
+ },
93
+ tooltipOptions: {
94
+ type: Object,
95
+ default: () => ({})
96
+ },
97
+ hasLeadingSeparator: {
98
+ type: Boolean,
99
+ default: !0
100
+ },
101
+ inputMode: {
102
+ type: String,
103
+ validator: (e) => ["text", "decimal", "numeric", "tel", "search", "email", "url"].includes(e),
104
+ default: "text"
105
+ },
106
+ pattern: {
107
+ type: String,
108
+ default: ""
109
+ },
110
+ labelClass: {
111
+ type: String,
112
+ default: ""
113
+ },
114
+ inputClass: {
115
+ type: String,
116
+ default: ""
117
+ }
118
+ },
119
+ emits: ["update:modelValue", "blur", "focus", "paste"],
120
+ setup(e, { expose: w }) {
121
+ const a = e, B = R(), b = c(), n = c(!1);
122
+ w({
123
+ focus: () => b.value.focus()
124
+ });
125
+ const p = c(!1), C = f(() => [
126
+ {
127
+ "shadow-[0_0_0_2px]": p.value && !a.isReadonly
128
+ },
129
+ !a.disabled && (a.errorMessage || a.hasError) ? "border-oc-error shadow-oc-error" : "border-oc-gray-200 shadow-oc-gray-200",
130
+ a.disabled ? "bg-oc-bg-dark pointer-events-none" : "bg-oc-bg-light",
131
+ a.inputClass
132
+ ]), I = f(() => {
133
+ const { class: t, ...l } = B, o = {};
134
+ return a.pattern && (o.pattern = a.pattern), { inputAttributes: o, ...l };
135
+ }), g = f(() => a.inputType === "password");
136
+ return (t, l) => (i(), m(y(M), {
137
+ label: e.isInlineLabel ? "" : e.label,
138
+ "label-class": e.labelClass,
139
+ hint: e.hint,
140
+ "error-message": e.errorMessage,
141
+ "is-required": e.isRequired,
142
+ "label-icon": e.labelIcon,
143
+ "tooltip-text": e.tooltipText,
144
+ "tooltip-options": e.tooltipOptions
145
+ }, P({
146
+ default: v(() => [
147
+ d("div", {
148
+ class: x(["rounded h-[36px] border flex items-center gap-x-3 px-3 cursor-pointer", C.value]),
149
+ onClick: l[5] || (l[5] = (o) => {
150
+ var h;
151
+ return (h = t.$refs.inputRef) == null ? void 0 : h.focus();
152
+ })
153
+ }, [
154
+ t.$slots.trailing ? (i(), r("div", F, [
155
+ u(t.$slots, "trailing")
156
+ ])) : s("", !0),
157
+ u(t.$slots, "icon", {}, () => [
158
+ e.icon ? (i(), m(y(k), S({
159
+ key: 0,
160
+ class: "w-5 h-5 text-oc-text-400",
161
+ name: e.icon
162
+ }, e.iconProps), null, 16, ["name"])) : s("", !0)
163
+ ]),
164
+ d("div", L, [
165
+ e.isInlineLabel && e.label ? (i(), r("label", O, $(e.label) + ": ", 1)) : s("", !0),
166
+ d("div", T, [
167
+ e.preFill ? (i(), r("span", q, $(e.preFill), 1)) : s("", !0),
168
+ d("input", S({
169
+ ref_key: "inputRef",
170
+ ref: b,
171
+ value: e.modelValue,
172
+ readonly: e.isReadonly,
173
+ placeholder: e.placeholder,
174
+ disabled: e.disabled,
175
+ autocomplete: e.autocomplete,
176
+ inputmode: e.inputMode,
177
+ class: "h-7 outline-none md:text-base text-lg w-full text-oc-text disabled:bg-transparent disabled:text-oc-text-300 text-ellipsis placeholder:font-normal placeholder:text-oc-text-300 bg-oc-bg-light"
178
+ }, I.value, {
179
+ type: g.value && n.value ? "text" : e.inputType,
180
+ onFocus: l[0] || (l[0] = (o) => {
181
+ p.value = !0, t.$emit("focus", o);
182
+ }),
183
+ onBlur: l[1] || (l[1] = () => {
184
+ p.value = !1, t.$emit("blur");
185
+ }),
186
+ onInput: l[2] || (l[2] = (o) => t.$emit("update:modelValue", o.target.value)),
187
+ onPaste: l[3] || (l[3] = (o) => t.$emit("paste"))
188
+ }), null, 16, E)
189
+ ])
190
+ ]),
191
+ t.$slots.leading || g.value ? (i(), r("div", {
192
+ key: 1,
193
+ class: x({
194
+ "border-l border-gray-200 pl-3 py-3": e.hasLeadingSeparator
195
+ })
196
+ }, [
197
+ t.$slots.leading ? s("", !0) : (i(), r("span", {
198
+ key: 0,
199
+ class: "text-oc-text-200",
200
+ onClick: l[4] || (l[4] = V((o) => n.value = !n.value, ["prevent"]))
201
+ }, [
202
+ (i(), m(y(k), {
203
+ key: n.value,
204
+ name: n.value ? "eye-open" : "eye-close",
205
+ width: "16",
206
+ height: "16"
207
+ }, null, 8, ["name"]))
208
+ ])),
209
+ u(t.$slots, "leading")
210
+ ], 2)) : s("", !0)
211
+ ], 2)
212
+ ]),
213
+ _: 2
214
+ }, [
215
+ t.$slots.hint ? {
216
+ name: "hint",
217
+ fn: v(() => [
218
+ u(t.$slots, "hint")
219
+ ]),
220
+ key: "0"
221
+ } : void 0
222
+ ]), 1032, ["label", "label-class", "hint", "error-message", "is-required", "label-icon", "tooltip-text", "tooltip-options"]));
223
+ }
224
+ };
225
+ export {
226
+ X as _
227
+ };
@@ -0,0 +1,160 @@
1
+ import { ref as u, computed as I, watch as q, openBlock as a, createBlock as p, unref as b, withCtx as h, createElementVNode as d, createElementBlock as x, toDisplayString as w, createCommentVNode as k, normalizeClass as O, renderSlot as C, Fragment as L, renderList as N, withKeys as A } from "vue";
2
+ import "dayjs";
3
+ import { _ as E } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
4
+ import { _ as F } from "./OcIcon-CJgBICxh.js";
5
+ import { _ as $ } from "./OcChip-B1hm2Qni.js";
6
+ /* empty css */
7
+ import "libphonenumber-js";
8
+ /* empty css */
9
+ import "v-calendar";
10
+ /* empty css */
11
+ import "./Cropper.js";
12
+ import "vue-draggable-next";
13
+ import "@popperjs/core";
14
+ const M = { class: "flex flex-1 items-baseline gap-x-2" }, j = {
15
+ key: 0,
16
+ class: "text-oc-text-300"
17
+ }, K = { class: "w-full flex flex-wrap gap-2" }, T = { key: 1 }, z = ["value", "readonly", "placeholder", "disabled"], oe = {
18
+ __name: "OcInputOption",
19
+ props: {
20
+ label: String,
21
+ hint: String,
22
+ errorMessage: String,
23
+ placeholder: String,
24
+ isInlineLabel: Boolean,
25
+ isReadonly: Boolean,
26
+ isDisabled: Boolean,
27
+ modelValue: Array,
28
+ maxVisibleOptions: {
29
+ type: Number,
30
+ default: 2
31
+ },
32
+ isRequired: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ allowDuplicated: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ labelIcon: {
41
+ type: String,
42
+ default: ""
43
+ },
44
+ tooltipText: {
45
+ type: String,
46
+ default: ""
47
+ },
48
+ tooltipOptions: {
49
+ type: Object,
50
+ default: () => ({})
51
+ }
52
+ },
53
+ emits: {
54
+ "update:modelValue": [],
55
+ "option-added": [],
56
+ "option-removed": [],
57
+ blur: []
58
+ },
59
+ setup(e, { expose: B, emit: R }) {
60
+ const m = e, c = R, o = u([]), v = u(), g = u(""), s = u(!1), y = u(!1), f = I(() => s.value ? o.value : o.value.slice(0, m.maxVisibleOptions)), S = (t) => {
61
+ o.value = o.value.filter((l) => l !== t), c("option-removed", t), c("update:modelValue", o.value);
62
+ }, V = (t) => {
63
+ if (!(t != null && t.trim()))
64
+ return;
65
+ const l = (t == null ? void 0 : t.split(",")) || [];
66
+ l.forEach((n) => {
67
+ var r;
68
+ n != null && n.trim() && (!m.allowDuplicated && ((r = o.value) != null && r.includes(n)) || (o.value.push(n), c("option-added", n)));
69
+ }), l.length && (g.value = "", c("update:modelValue", o.value));
70
+ };
71
+ return q(
72
+ () => m.modelValue,
73
+ () => {
74
+ o.value = [...m.modelValue || []];
75
+ },
76
+ {
77
+ immediate: !0,
78
+ deep: !0
79
+ }
80
+ ), B({
81
+ focus: () => v.value.focus()
82
+ }), (t, l) => (a(), p(b(E), {
83
+ label: e.isInlineLabel ? "" : e.label,
84
+ hint: e.hint,
85
+ "error-message": e.errorMessage,
86
+ "is-required": e.isRequired,
87
+ "label-icon": e.labelIcon,
88
+ "tooltip-text": e.tooltipText,
89
+ "tooltip-options": e.tooltipOptions
90
+ }, {
91
+ default: h(() => {
92
+ var n, r;
93
+ return [
94
+ d("div", M, [
95
+ e.isInlineLabel && e.label ? (a(), x("label", j, w(e.label) + ": ", 1)) : k("", !0),
96
+ d("div", {
97
+ class: "bg-oc-bg-light flex items-center gap-x-1 w-full",
98
+ onClick: l[4] || (l[4] = (i) => v.value.focus())
99
+ }, [
100
+ d("div", {
101
+ class: O(["border min-h-[36px] py-3 w-full px-3 flex justify-between items-center cursor-pointer gap-x-3 rounded", {
102
+ "border-oc-error": e.errorMessage && !e.isDisabled,
103
+ "pointer-events-none bg-oc-bg-dark": e.isDisabled
104
+ }])
105
+ }, [
106
+ d("div", K, [
107
+ C(t.$slots, "default", {
108
+ options: f.value,
109
+ areAllOptionsVisible: s.value
110
+ }, () => [
111
+ (a(!0), x(L, null, N(f.value, (i, D) => (a(), p(b($), {
112
+ key: `${i}-${D}`,
113
+ closable: "",
114
+ label: i,
115
+ onRemove: (G) => S(i)
116
+ }, null, 8, ["label", "onRemove"]))), 128)),
117
+ o.value.length > e.maxVisibleOptions ? (a(), p(b($), {
118
+ key: 0,
119
+ variant: "gray",
120
+ onClick: l[0] || (l[0] = (i) => s.value = !s.value)
121
+ }, {
122
+ default: h(() => [
123
+ s.value ? (a(), p(b(F), {
124
+ key: 0,
125
+ name: "minus",
126
+ width: "12",
127
+ height: "12"
128
+ })) : (a(), x("span", T, w(`+${o.value.length - e.maxVisibleOptions}`), 1))
129
+ ]),
130
+ _: 1
131
+ })) : k("", !0)
132
+ ]),
133
+ d("input", {
134
+ ref_key: "inputRef",
135
+ ref: v,
136
+ type: "text",
137
+ value: g.value,
138
+ readonly: e.isReadonly,
139
+ placeholder: ((n = f.value) == null ? void 0 : n.length) === 0 ? e.placeholder : "",
140
+ disabled: e.isDisabled,
141
+ class: O(["h-7 flex-1 outline-none text-oc-text disabled:bg-transparent placeholder:font-normal placeholder:text-oc-text-300 bg-oc-bg-light", ((r = f.value) == null ? void 0 : r.length) === 0 ? "min-w-full" : "min-w-[80px]"]),
142
+ onFocus: l[1] || (l[1] = (i) => y.value = !0),
143
+ onBlur: l[2] || (l[2] = (i) => {
144
+ console.log("$event: ", i), y.value = !1, t.$emit("blur", i);
145
+ }),
146
+ onKeyup: l[3] || (l[3] = A((i) => V(i.target.value), ["enter"]))
147
+ }, null, 42, z)
148
+ ])
149
+ ], 2)
150
+ ])
151
+ ])
152
+ ];
153
+ }),
154
+ _: 3
155
+ }, 8, ["label", "hint", "error-message", "is-required", "label-icon", "tooltip-text", "tooltip-options"]));
156
+ }
157
+ };
158
+ export {
159
+ oe as _
160
+ };
@@ -0,0 +1,143 @@
1
+ import { ref as p, computed as c, openBlock as o, createElementBlock as v, createBlock as L, unref as n, createCommentVNode as g, createVNode as f, withCtx as b, Fragment as O, renderList as C, createTextVNode as F, toDisplayString as q, createElementVNode as N, normalizeClass as $ } from "vue";
2
+ import "dayjs";
3
+ import { D as M } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
4
+ import { _ as h } from "./OcIcon-CJgBICxh.js";
5
+ /* empty css */
6
+ import { _ as T } from "./OcInput-tcRxG3Y2.js";
7
+ import "libphonenumber-js";
8
+ /* empty css */
9
+ import "v-calendar";
10
+ /* empty css */
11
+ import "./Cropper.js";
12
+ import "vue-draggable-next";
13
+ import "@popperjs/core";
14
+ const U = { class: "flex text-oc-text-400 items-center gap-x-2" }, P = {
15
+ key: 0,
16
+ class: "flex flex-col p-2 py-3 gap-2"
17
+ }, R = ["onClick"], ee = {
18
+ __name: "OcLinkInput",
19
+ props: {
20
+ placeholder: String,
21
+ hint: String,
22
+ label: String,
23
+ errorMessage: String,
24
+ isInlineLabel: Boolean,
25
+ isDisabled: Boolean,
26
+ modelValue: String,
27
+ type: String,
28
+ title: String,
29
+ links: {
30
+ type: Array,
31
+ default: () => []
32
+ },
33
+ isRequired: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ labelIcon: {
38
+ type: String,
39
+ default: ""
40
+ },
41
+ tooltipText: {
42
+ type: String,
43
+ default: ""
44
+ },
45
+ tooltipOptions: {
46
+ type: Object,
47
+ default: () => ({})
48
+ },
49
+ isEdit: Boolean
50
+ },
51
+ emits: {
52
+ "update:modelValue": [],
53
+ "update:type": [],
54
+ "update:title": []
55
+ },
56
+ setup(e, { emit: w }) {
57
+ var V, x;
58
+ const i = e, s = w, d = p(!1), r = p(i.type ?? ((x = (V = i.links) == null ? void 0 : V[0]) == null ? void 0 : x.value)), k = p(i.title ?? ""), u = c(
59
+ () => i.links.find((t) => t.value === r.value) ?? {}
60
+ ), m = c(() => u.value.preFill ?? ""), y = p(i.modelValue ? i.modelValue.replace(m.value, "") : ""), B = (t) => {
61
+ var l;
62
+ const a = (l = i.links.find((S) => S.value === t)) == null ? void 0 : l.preFill;
63
+ s("update:modelValue", i.modelValue.replace(m.value, a)), r.value = t, s("update:type", t), d.value = !1;
64
+ }, D = (t) => {
65
+ y.value = t, s("update:modelValue", m.value + t), !i.isEdit && r.value !== "link" && s("update:title", t);
66
+ }, E = c(() => u.value.placeholder ?? ""), I = c(() => r.value === "link");
67
+ return (t, a) => (o(), v("div", null, [
68
+ I.value || e.isEdit ? (o(), L(n(T), {
69
+ key: 0,
70
+ modelValue: k.value,
71
+ "onUpdate:modelValue": [
72
+ a[0] || (a[0] = (l) => k.value = l),
73
+ a[1] || (a[1] = (l) => t.$emit("update:title", l))
74
+ ],
75
+ class: "mb-3",
76
+ label: "Title",
77
+ placeholder: "Title",
78
+ "error-message": e.errorMessage ? " " : ""
79
+ }, null, 8, ["modelValue", "error-message"])) : g("", !0),
80
+ f(n(T), {
81
+ placeholder: E.value,
82
+ label: r.value === "link" ? "Link" : e.label,
83
+ "error-message": e.errorMessage,
84
+ "is-inline-label": e.isInlineLabel,
85
+ disabled: e.isDisabled,
86
+ hint: e.hint,
87
+ "pre-fill": m.value,
88
+ "model-value": y.value,
89
+ "is-required": e.isRequired,
90
+ "label-icon": e.labelIcon,
91
+ "tooltip-text": e.tooltipText,
92
+ "tooltip-options": e.tooltipOptions,
93
+ "onUpdate:modelValue": D
94
+ }, {
95
+ trailing: b(() => [
96
+ f(n(M), {
97
+ modelValue: d.value,
98
+ "onUpdate:modelValue": a[2] || (a[2] = (l) => d.value = l),
99
+ distance: 10
100
+ }, {
101
+ menu: b(() => [
102
+ e.isEdit ? g("", !0) : (o(), v("div", P, [
103
+ (o(!0), v(O, null, C(e.links, (l) => (o(), v("div", {
104
+ key: l.value,
105
+ class: "flex rounded-sm items-center px-3 py-2 gap-x-3 cursor-pointer text-oc-text-400 hover:bg-gray-50",
106
+ onClick: (S) => B(l.value)
107
+ }, [
108
+ f(n(h), {
109
+ width: "20",
110
+ height: "20",
111
+ name: l.icon
112
+ }, null, 8, ["name"]),
113
+ F(" " + q(l.label), 1)
114
+ ], 8, R))), 128))
115
+ ]))
116
+ ]),
117
+ default: b(() => [
118
+ N("div", U, [
119
+ u.value.icon ? (o(), L(n(h), {
120
+ key: 0,
121
+ width: "20",
122
+ height: "20",
123
+ name: u.value.icon
124
+ }, null, 8, ["name"])) : g("", !0),
125
+ f(n(h), {
126
+ width: "16",
127
+ height: "16",
128
+ class: $(["transition duration-300", d.value ? "-rotate-180" : ""]),
129
+ name: "chevron-down"
130
+ }, null, 8, ["class"])
131
+ ])
132
+ ]),
133
+ _: 1
134
+ }, 8, ["modelValue"])
135
+ ]),
136
+ _: 1
137
+ }, 8, ["placeholder", "label", "error-message", "is-inline-label", "disabled", "hint", "pre-fill", "model-value", "is-required", "label-icon", "tooltip-text", "tooltip-options"])
138
+ ]));
139
+ }
140
+ };
141
+ export {
142
+ ee as _
143
+ };
@@ -0,0 +1,76 @@
1
+ import { computed as m, openBlock as l, createElementBlock as p, normalizeClass as e, createElementVNode as o, createTextVNode as u, toDisplayString as i, createBlock as d, unref as r, withCtx as f, createVNode as v, createCommentVNode as g, renderSlot as x } from "vue";
2
+ import "dayjs";
3
+ import "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
4
+ import { _ as y } 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
+ import { _ as h } from "./OcCopyTooltip.vue_vue_type_script_setup_true_lang-S2RAfV_g.js";
14
+ const L = {
15
+ __name: "OcListDetail",
16
+ props: {
17
+ label: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ content: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ variant: {
26
+ type: String,
27
+ default: "small",
28
+ validator: (t) => ["small", "big"].includes(t)
29
+ },
30
+ alignment: {
31
+ type: String,
32
+ default: "horizontal",
33
+ validator: (t) => ["horizontal", "vertical"].includes(t)
34
+ },
35
+ showCopyTooltip: {
36
+ type: Boolean,
37
+ default: !0
38
+ }
39
+ },
40
+ setup(t) {
41
+ const n = t, a = m(() => n.alignment === "vertical");
42
+ return (c, S) => (l(), p("div", {
43
+ class: e(["flex gap-x-5 text-sm group", { "flex-col": a.value }])
44
+ }, [
45
+ o("div", {
46
+ class: e(["flex gap-x-2 items-center shrink-0 text-oc-text-400", { "w-[80px]": t.variant === "small" && !a.value }])
47
+ }, [
48
+ u(i(t.label) + " ", 1),
49
+ t.showCopyTooltip ? (l(), d(r(h), {
50
+ key: 0,
51
+ value: t.content
52
+ }, {
53
+ default: f(({ isShow: s }) => [
54
+ v(r(y), {
55
+ width: "14",
56
+ height: "14",
57
+ class: e(["cursor-pointer transition-all duration-500 group-hover:opacity-100", s ? "opacity-100" : "opacity-0"]),
58
+ name: "copy"
59
+ }, null, 8, ["class"])
60
+ ]),
61
+ _: 1
62
+ }, 8, ["value"])) : g("", !0)
63
+ ], 2),
64
+ o("div", {
65
+ class: e({ "text-base font-medium": a.value })
66
+ }, [
67
+ x(c.$slots, "content", {}, () => [
68
+ o("span", null, i(t.content), 1)
69
+ ])
70
+ ], 2)
71
+ ], 2));
72
+ }
73
+ };
74
+ export {
75
+ L as _
76
+ };