@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,485 @@
1
+ import { ref as b, computed as L, watch as q, nextTick as le, openBlock as s, createBlock as c, unref as n, createSlots as z, withCtx as y, createElementBlock as f, renderSlot as v, createCommentVNode as u, createVNode as C, normalizeClass as w, createElementVNode as k, Fragment as U, renderList as W, createTextVNode as te, mergeProps as ae, toDisplayString as V, withKeys as oe, withModifiers as ie } from "vue";
2
+ import "dayjs";
3
+ import { _ as se, D as ne, B as re, a as ue } from "./OcComplexCalendar.vue_vue_type_style_index_0_lang-CIQPD-6N.js";
4
+ import { _ as g } from "./OcIcon-CJgBICxh.js";
5
+ import { _ as E } from "./OcChip-B1hm2Qni.js";
6
+ import { S as de } from "./OcSkeleton-BdPTmGh0.js";
7
+ import { _ as H } from "./OcInput-tcRxG3Y2.js";
8
+ import "libphonenumber-js";
9
+ /* empty css */
10
+ /* empty css */
11
+ import "v-calendar";
12
+ /* empty css */
13
+ import "./Cropper.js";
14
+ import "vue-draggable-next";
15
+ import "@popperjs/core";
16
+ const ce = {
17
+ key: 0,
18
+ class: "flex flex-wrap gap-2 overflow-hidden"
19
+ }, me = {
20
+ key: 0,
21
+ class: "text-oc-text-300 md:text-base text-lg"
22
+ }, fe = {
23
+ key: 2,
24
+ class: "whitespace-nowrap flex gap-x-3 text-lg md:text-base items-center overflow-hidden"
25
+ }, he = {
26
+ key: 1,
27
+ class: "text-oc-text-300"
28
+ }, be = {
29
+ key: 2,
30
+ class: "truncate"
31
+ }, ve = {
32
+ key: 3,
33
+ class: "text-oc-text-300"
34
+ }, xe = {
35
+ key: 0,
36
+ class: "sticky px-3 pt-3 top-0 z-10 bg-white"
37
+ }, ye = { key: 0 }, Me = {
38
+ __name: "OcSelect",
39
+ props: {
40
+ label: String,
41
+ hint: String,
42
+ icon: String,
43
+ errorMessage: String,
44
+ placeholder: {
45
+ type: String,
46
+ default: "Placeholder"
47
+ },
48
+ isInlineLabel: Boolean,
49
+ isFilterable: Boolean,
50
+ isAsynchronousSearch: Boolean,
51
+ isDisabled: Boolean,
52
+ isReadonly: Boolean,
53
+ isCheckboxes: Boolean,
54
+ isSelectAll: Boolean,
55
+ isAddNew: Boolean,
56
+ isTransparent: Boolean,
57
+ isSlim: Boolean,
58
+ hideChevron: Boolean,
59
+ options: Array,
60
+ modelValue: [Array, String, Number],
61
+ maxVisibleOptions: {
62
+ type: Number,
63
+ default: 0
64
+ },
65
+ multiple: Boolean,
66
+ maxOptionAllowed: Number,
67
+ isRequired: {
68
+ type: Boolean,
69
+ default: !1
70
+ },
71
+ labelIcon: {
72
+ type: String,
73
+ default: ""
74
+ },
75
+ tooltipText: {
76
+ type: String,
77
+ default: ""
78
+ },
79
+ tooltipOptions: {
80
+ type: Object,
81
+ default: () => ({})
82
+ },
83
+ chipProps: {
84
+ type: Object,
85
+ default: () => ({})
86
+ },
87
+ popperOptions: {
88
+ type: Object,
89
+ default: () => ({
90
+ strategy: "fixed"
91
+ })
92
+ },
93
+ isInlineSearch: Boolean,
94
+ isClearable: Boolean,
95
+ searchKeywords: String,
96
+ isLoading: Boolean
97
+ },
98
+ emits: {
99
+ addNew: [],
100
+ "update:modelValue": [],
101
+ "max-option-allowed-set": [],
102
+ onSearchKeywords: "",
103
+ close: [],
104
+ toggle: [],
105
+ cleared: [],
106
+ loadMore: []
107
+ },
108
+ setup(e, { expose: I, emit: O }) {
109
+ const a = e, d = O, m = b(a.searchKeywords ?? ""), x = b(!1), R = b(), T = b(), N = b([]), K = b(), M = b((/* @__PURE__ */ new Date()).toISOString()), A = L(() => {
110
+ var t, l;
111
+ return a.multiple ? ((t = a.modelValue) == null ? void 0 : t.length) && ((l = a.modelValue) == null ? void 0 : l.length) === p.value.length : !1;
112
+ }), p = L(() => {
113
+ var l, o;
114
+ const t = [];
115
+ for (const i of a.options)
116
+ if (i.values) {
117
+ const r = i.values.filter(
118
+ ($) => {
119
+ var S, B;
120
+ return ((S = $.label) == null ? void 0 : S.toLowerCase().includes(m.value.toLowerCase())) || ((B = $.subLabel) == null ? void 0 : B.toLowerCase().includes(m.value.toLowerCase()));
121
+ }
122
+ );
123
+ r.length > 0 && t.push({
124
+ label: i.label,
125
+ values: r
126
+ });
127
+ } else
128
+ ((l = i.label) != null && l.toLowerCase().includes(m.value.toLowerCase()) || (o = i.subLabel) != null && o.toLowerCase().includes(m.value.toLowerCase())) && t.push(i);
129
+ return t;
130
+ }), h = L(() => {
131
+ if (a.multiple) {
132
+ let t = [];
133
+ if (a.modelValue)
134
+ for (const l of a.modelValue)
135
+ for (const o of a.options)
136
+ o.values ? o.values.forEach((i) => {
137
+ i.value === l && t.push(i);
138
+ }) : o.value === l && t.push(o);
139
+ return t;
140
+ } else
141
+ return a.options.find((t) => {
142
+ var l;
143
+ return t.value.toString() === ((l = a.modelValue) == null ? void 0 : l.toString());
144
+ });
145
+ }), F = (t) => {
146
+ var o;
147
+ if (t.isDisabled)
148
+ return;
149
+ let l;
150
+ if (a.multiple) {
151
+ const i = (a.modelValue || []).find((r) => r === t.value);
152
+ if (!i && a.maxOptionAllowed && ((o = h.value) == null ? void 0 : o.length) >= Number(a.maxOptionAllowed)) {
153
+ d("max-option-allowed-set");
154
+ return;
155
+ }
156
+ l = i ? (a.modelValue || []).filter((r) => r !== t.value) : [...a.modelValue || [], t.value];
157
+ } else
158
+ l = t.value, x.value = !1;
159
+ d("update:modelValue", l);
160
+ }, J = (t) => {
161
+ d(
162
+ "update:modelValue",
163
+ (a.modelValue || []).filter((l) => l !== t)
164
+ );
165
+ }, Q = () => {
166
+ a.isAsynchronousSearch || (A.value ? d("update:modelValue", null) : d(
167
+ "update:modelValue",
168
+ p.value.map((t) => t.value)
169
+ ));
170
+ }, D = b();
171
+ q(p, () => {
172
+ M.value = (/* @__PURE__ */ new Date()).toISOString();
173
+ }), q(x, (t) => {
174
+ if (!t) {
175
+ d("close");
176
+ return;
177
+ }
178
+ le(() => {
179
+ var l;
180
+ (l = R.value) == null || l.focus();
181
+ });
182
+ });
183
+ const P = b("100%"), X = L(() => ({ maxWidth: P.value })), Y = () => {
184
+ var t, l, o, i;
185
+ d("toggle"), P.value = (l = (t = D.value) == null ? void 0 : t.$el) != null && l.offsetWidth ? `${(i = (o = D.value) == null ? void 0 : o.$el) == null ? void 0 : i.offsetWidth}px` : "100%", setTimeout(() => {
186
+ var j;
187
+ let r, $;
188
+ if (Array.isArray(a.modelValue) ? r = a.modelValue[0] ?? null : r = a.modelValue, !r) return;
189
+ p.value.find((_, ee) => {
190
+ if (_.value === r)
191
+ return $ = ee, !0;
192
+ });
193
+ const S = N.value[$], B = (j = S == null ? void 0 : S.optionItemRef) == null ? void 0 : j.offsetTop;
194
+ K.value.parentNode.scrollTo(0, B - 60, { behavior: "smooth" });
195
+ }, 10);
196
+ }, Z = (t) => {
197
+ var o, i, r;
198
+ if (a.isLoading)
199
+ return;
200
+ ((o = t.target) == null ? void 0 : o.scrollHeight) - Math.round((i = t.target) == null ? void 0 : i.scrollTop) <= ((r = t.target) == null ? void 0 : r.clientHeight) && d("loadMore");
201
+ };
202
+ return I({
203
+ dropdownRef: T
204
+ }), (t, l) => (s(), c(n(se), {
205
+ ref_key: "baseInput",
206
+ ref: D,
207
+ class: "relative rounded",
208
+ label: e.isInlineLabel ? "" : e.label,
209
+ hint: e.hint,
210
+ "error-message": e.errorMessage,
211
+ "is-required": e.isRequired,
212
+ "label-icon": e.labelIcon,
213
+ "tooltip-text": e.tooltipText,
214
+ "tooltip-options": e.tooltipOptions
215
+ }, z({
216
+ tooltipText: y(() => [
217
+ t.$slots.selectTooltipText ? (s(), f("div", ye, [
218
+ v(t.$slots, "selectTooltipText")
219
+ ])) : u("", !0)
220
+ ]),
221
+ default: y(() => [
222
+ C(n(ne), {
223
+ ref_key: "dropdownRef",
224
+ ref: T,
225
+ modelValue: x.value,
226
+ "onUpdate:modelValue": [
227
+ l[7] || (l[7] = (o) => x.value = o),
228
+ Y
229
+ ],
230
+ class: w(["w-full", {
231
+ "!bg-transparent": e.isTransparent
232
+ }]),
233
+ distance: 4,
234
+ "popper-class": "w-full",
235
+ placement: "bottom-end",
236
+ "popper-style": X.value,
237
+ "popper-options": e.popperOptions,
238
+ "is-disabled": e.isDisabled || e.isReadonly,
239
+ onScroll: Z
240
+ }, {
241
+ menu: y(() => {
242
+ var o;
243
+ return [
244
+ k("div", {
245
+ ref_key: "selectListRef",
246
+ ref: K,
247
+ class: "flex flex-col gap-y-2"
248
+ }, [
249
+ e.isFilterable && !e.isInlineSearch || e.isFilterable && e.isInlineSearch && h.value ? (s(), f("div", xe, [
250
+ C(n(H), {
251
+ ref_key: "searchInputRef",
252
+ ref: R,
253
+ modelValue: m.value,
254
+ "onUpdate:modelValue": [
255
+ l[4] || (l[4] = (i) => m.value = i),
256
+ l[5] || (l[5] = (i) => t.$emit("onSearchKeywords", m.value))
257
+ ],
258
+ icon: "search",
259
+ placeholder: "Search"
260
+ }, {
261
+ icon: y(() => [
262
+ C(n(g), {
263
+ class: "w-5 h-5 text-oc-text-400",
264
+ name: "search"
265
+ })
266
+ ]),
267
+ _: 1
268
+ }, 8, ["modelValue"])
269
+ ])) : u("", !0),
270
+ k("div", {
271
+ class: w(["flex px-3 pb-3 flex-col gap-y-2", { "pt-3": !e.isFilterable || e.isInlineSearch && !h.value }])
272
+ }, [
273
+ e.isCheckboxes && e.isSelectAll && p.value.length && e.multiple ? (s(), c(n(G), {
274
+ key: 0,
275
+ "is-selected": A.value,
276
+ "is-checkboxes": "",
277
+ "is-partial": !A.value && !!((o = e.modelValue) != null && o.length),
278
+ class: "border-b border-oc-gray-200",
279
+ label: "Select All",
280
+ onClick: Q
281
+ }, null, 8, ["is-selected", "is-partial"])) : u("", !0),
282
+ v(t.$slots, "default", {
283
+ key: M.value,
284
+ fOptions: p.value,
285
+ selectOption: F
286
+ }, () => [
287
+ (s(!0), f(U, null, W(p.value, (i) => (s(), c(n(G), {
288
+ ref_for: !0,
289
+ ref_key: "filterableOptionsRef",
290
+ ref: N,
291
+ key: i.value,
292
+ label: i.label,
293
+ "sub-label": i.subLabel,
294
+ "is-disabled": i.isDisabled,
295
+ "is-checkboxes": e.isCheckboxes,
296
+ "is-selected": e.multiple ? e.modelValue ? e.modelValue.find((r) => r === i.value) !== void 0 : !1 : e.modelValue === i.value,
297
+ onClick: (r) => F(i)
298
+ }, null, 8, ["label", "sub-label", "is-disabled", "is-checkboxes", "is-selected", "onClick"]))), 128))
299
+ ]),
300
+ v(t.$slots, "infinite-scrolling"),
301
+ e.isLoading ? (s(), c(n(de), {
302
+ key: 1,
303
+ class: w(["h-[20px] rounded-sm", { "mt-2": !e.options.length && e.isFilterable }])
304
+ }, null, 8, ["class"])) : u("", !0)
305
+ ], 2),
306
+ e.isAddNew ? (s(), c(n(re), {
307
+ key: 1,
308
+ variant: "secondary",
309
+ class: "flex items-center py-2 justify-center gap-x-[6px] sticky bottom-0 bg-white z-10",
310
+ size: "small",
311
+ "is-transparent": "",
312
+ onClick: l[6] || (l[6] = (i) => t.$emit("addNew"))
313
+ }, {
314
+ default: y(() => [
315
+ C(n(g), {
316
+ class: "w-5 h-5",
317
+ name: "plus"
318
+ }),
319
+ l[8] || (l[8] = te(" Add new "))
320
+ ]),
321
+ _: 1
322
+ })) : u("", !0)
323
+ ], 512)
324
+ ];
325
+ }),
326
+ default: y(() => [
327
+ k("div", {
328
+ class: w(["border min-h-[36px] w-full px-3 flex justify-between items-center bg-white cursor-pointer gap-x-3 rounded", {
329
+ "border-oc-error": e.errorMessage && !e.isDisabled,
330
+ "pointer-events-none !bg-oc-bg-dark": e.isDisabled,
331
+ "py-3": e.multiple,
332
+ "border-none !min-h-[30px] !px-0": e.isTransparent && !e.isSlim,
333
+ "border-none !min-h-[18px] !px-0": e.isSlim
334
+ }])
335
+ }, [
336
+ e.multiple ? (s(), f("div", ce, [
337
+ v(t.$slots, "selection", {}, () => [
338
+ (s(!0), f(U, null, W(e.maxVisibleOptions ? h.value.slice(0, e.maxVisibleOptions) : h.value, (o) => (s(), c(n(E), ae({
339
+ key: o.value,
340
+ closable: "",
341
+ variant: o.variant,
342
+ label: o.label,
343
+ ref_for: !0
344
+ }, e.chipProps, {
345
+ "should-truncate-chip": "",
346
+ onRemove: (i) => J(o.value)
347
+ }), null, 16, ["variant", "label", "onRemove"]))), 128)),
348
+ e.maxVisibleOptions && h.value.length > e.maxVisibleOptions ? (s(), c(n(E), {
349
+ key: 0,
350
+ label: `+${h.value.length - e.maxVisibleOptions}`
351
+ }, null, 8, ["label"])) : u("", !0)
352
+ ]),
353
+ h.value.length === 0 ? (s(), f("span", me, V(e.placeholder), 1)) : u("", !0)
354
+ ])) : u("", !0),
355
+ e.isInlineSearch && e.isFilterable && !h.value ? (s(), c(n(H), {
356
+ key: 1,
357
+ modelValue: m.value,
358
+ "onUpdate:modelValue": [
359
+ l[0] || (l[0] = (o) => m.value = o),
360
+ l[1] || (l[1] = (o) => t.$emit("onSearchKeywords", m.value))
361
+ ],
362
+ placeholder: "Search",
363
+ "input-class": "!border-none !shadow-none",
364
+ "is-readonly": !x.value,
365
+ onKeyup: l[2] || (l[2] = oe((o) => x.value = !1, ["enter"]))
366
+ }, z({ _: 2 }, [
367
+ x.value ? {
368
+ name: "icon",
369
+ fn: y(() => [
370
+ C(n(g), {
371
+ class: "w-5 h-5 text-oc-text-400",
372
+ name: "search"
373
+ })
374
+ ]),
375
+ key: "0"
376
+ } : void 0
377
+ ]), 1032, ["modelValue", "is-readonly"])) : (s(), f("span", fe, [
378
+ e.icon ? (s(), c(n(g), {
379
+ key: 0,
380
+ name: e.icon,
381
+ width: "16",
382
+ height: "16"
383
+ }, null, 8, ["name"])) : u("", !0),
384
+ e.isInlineLabel && e.label ? (s(), f("span", he, V(e.label) + ": ", 1)) : u("", !0),
385
+ h.value ? (s(), f("span", be, V(h.value.label), 1)) : (s(), f("span", ve, V(e.placeholder), 1))
386
+ ])),
387
+ e.modelValue && e.isClearable ? (s(), c(n(g), {
388
+ key: 3,
389
+ class: "text-oc-text-400 ml-auto transition-all shrink-0 duration-500 hover:rotate-90",
390
+ width: "16",
391
+ height: "16",
392
+ name: "x",
393
+ onClick: l[3] || (l[3] = ie((o) => d("cleared"), ["stop"]))
394
+ })) : u("", !0),
395
+ e.hideChevron ? u("", !0) : (s(), c(n(g), {
396
+ key: 4,
397
+ class: w(["w-5 h-5 text-oc-text-400 transition-all shrink-0 duration-500", x.value && "-rotate-180"]),
398
+ name: "chevron-down"
399
+ }, null, 8, ["class"]))
400
+ ], 2)
401
+ ]),
402
+ _: 3
403
+ }, 8, ["modelValue", "class", "popper-style", "popper-options", "is-disabled"])
404
+ ]),
405
+ _: 2
406
+ }, [
407
+ t.$slots.hint ? {
408
+ name: "hint",
409
+ fn: y(() => [
410
+ v(t.$slots, "hint")
411
+ ]),
412
+ key: "0"
413
+ } : void 0
414
+ ]), 1032, ["label", "hint", "error-message", "is-required", "label-icon", "tooltip-text", "tooltip-options"]));
415
+ }
416
+ }, ge = { class: "w-full flex items-center gap-x-3" }, we = { class: "truncate" }, pe = {
417
+ key: 0,
418
+ class: "text-sm text-oc-text-300"
419
+ }, G = {
420
+ __name: "OcOption",
421
+ props: {
422
+ label: String,
423
+ subLabel: String,
424
+ isSelected: [Boolean, Number],
425
+ isCheckboxes: Boolean,
426
+ isPartial: Boolean,
427
+ hasChildren: Boolean,
428
+ showChildren: Boolean,
429
+ isDisabled: Boolean
430
+ },
431
+ emits: ["select", "show:children", "hide:children"],
432
+ setup(e, { expose: I }) {
433
+ const O = b();
434
+ return I({
435
+ optionItemRef: O
436
+ }), (a, d) => (s(), f("div", {
437
+ ref_key: "optionItemRef",
438
+ ref: O,
439
+ class: "w-full flex flex-wrap relative hover:bg-oc-accent-1-50 rounded-sm"
440
+ }, [
441
+ k("div", {
442
+ class: w(["w-full p-3 flex items-center text-oc-text-400 justify-between cursor-pointer gap-x-3", {
443
+ "bg-oc-accent-1-50": e.isSelected && !e.isCheckboxes,
444
+ "opacity-50 hover:bg-white !cursor-default": e.isDisabled
445
+ }]),
446
+ onClick: d[0] || (d[0] = (m) => a.$emit("select"))
447
+ }, [
448
+ e.isCheckboxes ? (s(), c(n(ue), {
449
+ key: 0,
450
+ "model-value": !!e.isSelected,
451
+ "is-partial": e.isPartial,
452
+ class: "!w-fit pointer-events-none"
453
+ }, null, 8, ["model-value", "is-partial"])) : u("", !0),
454
+ k("div", ge, [
455
+ v(a.$slots, "trailing"),
456
+ k("div", {
457
+ class: w(["flex flex-col gap-3 overflow-hidden", { "flex-1": e.isCheckboxes }])
458
+ }, [
459
+ k("span", we, V(e.label), 1),
460
+ v(a.$slots, "sub-label", {}, () => [
461
+ e.subLabel ? (s(), f("span", pe, V(e.subLabel), 1)) : u("", !0)
462
+ ])
463
+ ], 2),
464
+ v(a.$slots, "leading")
465
+ ]),
466
+ e.isSelected && !e.isCheckboxes ? (s(), c(n(g), {
467
+ key: 1,
468
+ class: "w-5 h-5 text-oc-primary",
469
+ name: "check-2"
470
+ })) : u("", !0)
471
+ ], 2),
472
+ e.hasChildren ? (s(), c(n(g), {
473
+ key: 0,
474
+ class: w(["w-6 h-6 absolute right-[10px] top-[8px] cursor-pointer", e.showChildren ? "rotate-180" : ""]),
475
+ name: "chevron-down",
476
+ onClick: d[1] || (d[1] = (m) => e.showChildren ? a.$emit("hide:children") : a.$emit("show:children"))
477
+ }, null, 8, ["class"])) : u("", !0),
478
+ v(a.$slots, "after")
479
+ ], 512));
480
+ }
481
+ };
482
+ export {
483
+ Me as _,
484
+ G as a
485
+ };
@@ -0,0 +1,55 @@
1
+ import { computed as r, openBlock as c, createElementBlock as i, normalizeClass as o, createVNode as a, unref as n } from "vue";
2
+ import "dayjs";
3
+ import "./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 _ = {
14
+ __name: "OcOverviewIcon",
15
+ props: {
16
+ icon: {
17
+ type: String,
18
+ default: "circle"
19
+ },
20
+ variant: {
21
+ type: String,
22
+ default: "blue"
23
+ },
24
+ width: {
25
+ type: String,
26
+ default: "22"
27
+ },
28
+ height: {
29
+ type: String,
30
+ default: "22"
31
+ }
32
+ },
33
+ setup(t) {
34
+ const e = r(() => ({
35
+ gray: "bg-oc-gray-100 text-oc-gray-700",
36
+ orange: "bg-oc-warning-50-tr text-oc-warning-600",
37
+ red: "bg-oc-error-50-tr text-oc-error",
38
+ green: "bg-oc-success-50-tr text-oc-success",
39
+ accent: "bg-oc-accent-1-50-tr text-oc-accent-1",
40
+ blue: "bg-oc-primary-50-tr text-oc-primary"
41
+ }));
42
+ return (s, g) => (c(), i("div", {
43
+ class: o(["rounded-full p-3 flex items-center justify-center aspect-square", e.value[t.variant]])
44
+ }, [
45
+ a(n(m), {
46
+ name: t.icon,
47
+ width: t.width,
48
+ height: t.height
49
+ }, null, 8, ["name", "width", "height"])
50
+ ], 2));
51
+ }
52
+ };
53
+ export {
54
+ _
55
+ };