@wikicasa-dev/components 2.6.13 → 2.6.14-alpha.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 (215) hide show
  1. package/dist/UIKit/AccessibleSelect.js +5 -5
  2. package/dist/UIKit/AccessibleSelect.vue.js +217 -205
  3. package/dist/UIKit/Accordion/AccordionContentPrimitive.js +5 -4
  4. package/dist/UIKit/Accordion/AccordionContentPrimitive.vue.js +19 -21
  5. package/dist/UIKit/Accordion/AccordionHeaderPrimitive.js +5 -4
  6. package/dist/UIKit/Accordion/AccordionHeaderPrimitive.vue.js +18 -20
  7. package/dist/UIKit/Accordion/AccordionItemPrimitive.js +5 -4
  8. package/dist/UIKit/Accordion/AccordionItemPrimitive.vue.js +21 -23
  9. package/dist/UIKit/Accordion/AccordionTriggerPrimitive.js +5 -4
  10. package/dist/UIKit/Accordion/AccordionTriggerPrimitive.vue.js +19 -21
  11. package/dist/UIKit/Accordion/BaseAccordion.js +5 -4
  12. package/dist/UIKit/Accordion/BaseAccordion.vue.js +38 -36
  13. package/dist/UIKit/Accordion/BaseAccordionItem.js +5 -5
  14. package/dist/UIKit/Accordion/BaseAccordionItem.vue.js +64 -81
  15. package/dist/UIKit/Autocomplete/ClearableAutocomplete.js +5 -5
  16. package/dist/UIKit/Autocomplete/ClearableAutocomplete.vue.js +232 -226
  17. package/dist/UIKit/BaseAlert.js +5 -5
  18. package/dist/UIKit/BaseAlert.vue.js +14 -18
  19. package/dist/UIKit/BaseAutocomplete.js +5 -5
  20. package/dist/UIKit/BaseAutocomplete.vue.js +197 -194
  21. package/dist/UIKit/BaseBadge.js +5 -5
  22. package/dist/UIKit/BaseBadge.vue.js +17 -17
  23. package/dist/UIKit/BaseBreadcrumb.js +5 -4
  24. package/dist/UIKit/BaseBreadcrumb.vue.js +39 -56
  25. package/dist/UIKit/BaseButton.js +5 -4
  26. package/dist/UIKit/BaseButton.vue.js +93 -87
  27. package/dist/UIKit/BaseComplexToggle.js +5 -6
  28. package/dist/UIKit/BaseComplexToggle.vue.js +87 -105
  29. package/dist/UIKit/BaseDropDown.js +5 -5
  30. package/dist/UIKit/BaseDropDown.vue.js +171 -152
  31. package/dist/UIKit/BaseFloatingLabel.js +6 -7
  32. package/dist/UIKit/BaseFloatingLabel.vue.js +43 -39
  33. package/dist/UIKit/BaseInput.js +6 -7
  34. package/dist/UIKit/BaseInput.vue.js +191 -210
  35. package/dist/UIKit/BaseModal.js +5 -5
  36. package/dist/UIKit/BaseModal.vue.js +160 -169
  37. package/dist/UIKit/BasePagination.js +5 -4
  38. package/dist/UIKit/BasePagination.vue.js +192 -229
  39. package/dist/UIKit/BaseSelect/SelectItem.js +5 -4
  40. package/dist/UIKit/BaseSelect/SelectItem.vue.js +34 -41
  41. package/dist/UIKit/BaseSlider.js +6 -7
  42. package/dist/UIKit/BaseSlider.vue.js +153 -203
  43. package/dist/UIKit/BaseSnackbar.js +5 -5
  44. package/dist/UIKit/BaseSnackbar.vue.js +144 -146
  45. package/dist/UIKit/BaseTextarea.js +5 -6
  46. package/dist/UIKit/BaseTextarea.vue.js +118 -126
  47. package/dist/UIKit/BaseToggle.js +5 -4
  48. package/dist/UIKit/BaseToggle.vue.js +37 -38
  49. package/dist/UIKit/BaseTooltip.js +6 -7
  50. package/dist/UIKit/BaseTooltip.vue.js +31 -40
  51. package/dist/UIKit/BaseUploadFile.js +5 -4
  52. package/dist/UIKit/BaseUploadFile.vue.js +63 -70
  53. package/dist/UIKit/Card/BaseCard.js +5 -5
  54. package/dist/UIKit/Card/BaseCard.vue.js +23 -36
  55. package/dist/UIKit/Card/CardDescriptionPrimitive.js +9 -11
  56. package/dist/UIKit/Card/CardImagePrimitive.js +5 -4
  57. package/dist/UIKit/Card/CardImagePrimitive.vue.js +11 -15
  58. package/dist/UIKit/Card/CardRootPrimitive.js +5 -5
  59. package/dist/UIKit/Card/CardRootPrimitive.vue.js +22 -26
  60. package/dist/UIKit/Card/type.js +4 -4
  61. package/dist/UIKit/Checkbox/CheckboxBtn.js +5 -5
  62. package/dist/UIKit/Checkbox/CheckboxBtn.vue.js +76 -81
  63. package/dist/UIKit/Checkbox/CheckboxGroup.js +5 -4
  64. package/dist/UIKit/Checkbox/CheckboxGroup.vue.js +137 -116
  65. package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.js +5 -4
  66. package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.vue.js +71 -77
  67. package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.js +5 -4
  68. package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.vue.js +32 -34
  69. package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.js +5 -4
  70. package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.vue.js +32 -34
  71. package/dist/UIKit/ProgressBar/ProgressIndicatorPrimitive.js +5 -4
  72. package/dist/UIKit/ProgressBar/ProgressIndicatorPrimitive.vue.js +15 -15
  73. package/dist/UIKit/ProgressBar/ProgressRootPrimitive.js +5 -4
  74. package/dist/UIKit/ProgressBar/ProgressRootPrimitive.vue.js +29 -31
  75. package/dist/UIKit/Radio/RadioButton.js +5 -4
  76. package/dist/UIKit/Radio/RadioButton.vue.js +51 -59
  77. package/dist/UIKit/Radio/RadioGroup.js +5 -4
  78. package/dist/UIKit/Radio/RadioGroup.vue.js +67 -63
  79. package/dist/UIKit/Radio/v2/RadioButtonGroup.js +5 -4
  80. package/dist/UIKit/Radio/v2/RadioButtonGroup.vue.js +38 -47
  81. package/dist/UIKit/Radio/v2/RadioButtonItem.js +5 -5
  82. package/dist/UIKit/Radio/v2/RadioButtonItem.vue.js +42 -44
  83. package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.js +5 -4
  84. package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js +28 -30
  85. package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +6 -7
  86. package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +19 -19
  87. package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +5 -4
  88. package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +41 -30
  89. package/dist/UIKit/Slider/SimpleSlider.js +6 -7
  90. package/dist/UIKit/Slider/SimpleSlider.vue.js +74 -81
  91. package/dist/UIKit/StaticSpinner.js +6 -7
  92. package/dist/UIKit/StaticSpinner.vue.js +24 -26
  93. package/dist/UIKit/Tab/BaseTab.js +5 -4
  94. package/dist/UIKit/Tab/BaseTab.vue.js +14 -14
  95. package/dist/UIKit/Tab/BaseTabList.js +5 -4
  96. package/dist/UIKit/Tab/BaseTabList.vue.js +45 -44
  97. package/dist/UIKit/Tab/BaseTabPanel.js +5 -4
  98. package/dist/UIKit/Tab/BaseTabPanel.vue.js +27 -24
  99. package/dist/UIKit/Tab/BaseTabView.js +5 -4
  100. package/dist/UIKit/Tab/BaseTabView.vue.js +107 -105
  101. package/dist/UIKit/Tab/v2/BaseTabs.js +5 -5
  102. package/dist/UIKit/Tab/v2/BaseTabs.vue.js +34 -38
  103. package/dist/UIKit/Tab/v2/BaseTabsContent.js +5 -4
  104. package/dist/UIKit/Tab/v2/BaseTabsContent.vue.js +21 -23
  105. package/dist/UIKit/Tab/v2/BaseTabsIndicator.js +5 -5
  106. package/dist/UIKit/Tab/v2/BaseTabsIndicator.vue.js +24 -33
  107. package/dist/UIKit/Tab/v2/BaseTabsList.js +5 -4
  108. package/dist/UIKit/Tab/v2/BaseTabsList.vue.js +20 -22
  109. package/dist/UIKit/Tab/v2/BaseTabsTrigger.js +5 -4
  110. package/dist/UIKit/Tab/v2/BaseTabsTrigger.vue.js +21 -30
  111. package/dist/UIKit/types.js +0 -1
  112. package/dist/_virtual/_plugin-vue_export-helper.js +7 -8
  113. package/dist/assets/AccessibleSelect.css +1 -1
  114. package/dist/assets/BaseAccordionItem.css +1 -1
  115. package/dist/assets/BaseAutocomplete.css +1 -1
  116. package/dist/assets/BaseBadge.css +1 -1
  117. package/dist/assets/BaseComplexToggle2.css +1 -1
  118. package/dist/assets/BaseDropDown.css +1 -1
  119. package/dist/assets/BaseFloatingLabel2.css +1 -1
  120. package/dist/assets/BaseInput2.css +1 -1
  121. package/dist/assets/BaseShimmerLoader.css +1 -1
  122. package/dist/assets/BaseSlider2.css +1 -1
  123. package/dist/assets/BaseSnackbar.css +1 -1
  124. package/dist/assets/BaseTabs.css +1 -1
  125. package/dist/assets/BaseTextarea2.css +1 -1
  126. package/dist/assets/BaseTooltip2.css +1 -1
  127. package/dist/assets/CheckboxBtn.css +1 -1
  128. package/dist/assets/ClearableAutocomplete.css +1 -1
  129. package/dist/assets/RadioButtonItem.css +1 -1
  130. package/dist/assets/StaticSpinner.css +1 -1
  131. package/dist/assets/SwiperCarousel.css +1 -1
  132. package/dist/assets/baseAlert.css +1 -1
  133. package/dist/assets/baseCard.css +1 -1
  134. package/dist/assets/baseComplexToggle.css +1 -1
  135. package/dist/assets/baseFloatingLabel.css +1 -1
  136. package/dist/assets/baseInput.css +1 -1
  137. package/dist/assets/baseModal.css +1 -1
  138. package/dist/assets/baseSlider.css +1 -1
  139. package/dist/assets/baseSpinner.css +1 -1
  140. package/dist/assets/baseTextarea.css +1 -1
  141. package/dist/assets/baseTooltip.css +1 -1
  142. package/dist/assets/swiper-free-mode.css +1 -1
  143. package/dist/assets/swiper-navigation.css +1 -1
  144. package/dist/assets/swiper-pagination.css +1 -1
  145. package/dist/assets/swiper-swiper.css +1 -1
  146. package/dist/assets/swiper-thumbs.css +1 -0
  147. package/dist/assets/swiper-zoom.css +1 -1
  148. package/dist/assets/swiperPaginationBullet.css +1 -1
  149. package/dist/assets/tailwind.css +1 -1
  150. package/dist/chart/DoughnutChart.js +5 -4
  151. package/dist/chart/DoughnutChart.vue.js +25 -25
  152. package/dist/chart/LineChart.js +5 -4
  153. package/dist/chart/LineChart.vue.js +27 -29
  154. package/dist/components/IntersectionObserver/IntersectionObservable.js +5 -4
  155. package/dist/components/IntersectionObserver/IntersectionObservable.vue.js +24 -23
  156. package/dist/components/IntersectionObserver/IntersectionObserver.js +5 -4
  157. package/dist/components/IntersectionObserver/IntersectionObserver.vue.js +55 -49
  158. package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.js +5 -4
  159. package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js +43 -38
  160. package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.js +5 -4
  161. package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.vue.js +27 -30
  162. package/dist/components/IntersectionObserver/v2/types.js +4 -6
  163. package/dist/components/carousel/Primitive/SwiperNavigationPrimitive.js +5 -4
  164. package/dist/components/carousel/Primitive/SwiperNavigationPrimitive.vue.js +30 -38
  165. package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.js +5 -4
  166. package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.vue.js +28 -32
  167. package/dist/components/carousel/Primitive/SwiperPrimitive.js +5 -4
  168. package/dist/components/carousel/Primitive/SwiperPrimitive.vue.js +16 -20
  169. package/dist/components/carousel/Primitive/SwiperRootPrimitive.js +5 -10
  170. package/dist/components/carousel/Primitive/SwiperRootPrimitive.vue.js +82 -112
  171. package/dist/components/carousel/Primitive/SwiperSlideImagePrimitive.js +5 -5
  172. package/dist/components/carousel/Primitive/SwiperSlideImagePrimitive.vue.js +44 -39
  173. package/dist/components/carousel/SwiperCarousel.js +6 -7
  174. package/dist/components/carousel/SwiperCarousel.vue.js +195 -229
  175. package/dist/components/carousel/SwiperSlide.js +9 -13
  176. package/dist/composables/mock.js +50 -48
  177. package/dist/composables/useFloatingLabel.js +32 -32
  178. package/dist/composables/useValidator.js +5 -7
  179. package/dist/index.js +67 -150
  180. package/dist/lazyModules/ChartJs/Chart.js +2 -4
  181. package/dist/lazyModules/ChartJs/DoughnutChart/core.js +5 -6
  182. package/dist/lazyModules/ChartJs/LineChart/cartesian.js +5 -6
  183. package/dist/lazyModules/ChartJs/LineChart/core.js +5 -6
  184. package/dist/lazyModules/ChartJs/Plugins/Legend.js +4 -2
  185. package/dist/lazyModules/ChartJs/Plugins/TimeScale.js +4 -2
  186. package/dist/lazyModules/ChartJs/Plugins/Title.js +4 -2
  187. package/dist/lazyModules/ChartJs/Plugins/Tooltip.js +4 -2
  188. package/dist/lazyModules/Swiper/Autoplay/factory.js +6 -8
  189. package/dist/lazyModules/Swiper/Autoplay/index.js +3 -6
  190. package/dist/lazyModules/Swiper/Controller/factory.js +6 -6
  191. package/dist/lazyModules/Swiper/Controller/index.js +3 -6
  192. package/dist/lazyModules/Swiper/FreeMode/factory.js +6 -8
  193. package/dist/lazyModules/Swiper/FreeMode/index.js +3 -6
  194. package/dist/lazyModules/Swiper/Keyboard/factory.js +6 -8
  195. package/dist/lazyModules/Swiper/Keyboard/index.js +3 -6
  196. package/dist/lazyModules/Swiper/Navigation/factory.js +6 -8
  197. package/dist/lazyModules/Swiper/Navigation/index.js +3 -6
  198. package/dist/lazyModules/Swiper/Pagination/factory.js +6 -6
  199. package/dist/lazyModules/Swiper/Pagination/index.js +3 -6
  200. package/dist/lazyModules/Swiper/Thumbs/factory.js +6 -6
  201. package/dist/lazyModules/Swiper/Thumbs/index.js +3 -6
  202. package/dist/lazyModules/Swiper/Zoom/factory.js +6 -8
  203. package/dist/lazyModules/Swiper/Zoom/index.js +3 -6
  204. package/dist/lazyModules/Swiper/factory.js +9 -12
  205. package/dist/lazyModules/Swiper/index.js +2 -4
  206. package/dist/lazyModules/Swiper/swiper-css.d.js +0 -1
  207. package/dist/lazyModules/Swiper/types.js +0 -1
  208. package/dist/lazyModules/VueChartJs/Doughnut/factory.js +8 -11
  209. package/dist/lazyModules/VueChartJs/Doughnut/index.js +2 -5
  210. package/dist/lazyModules/VueChartJs/Line/factory.js +8 -13
  211. package/dist/lazyModules/VueChartJs/Line/index.js +2 -5
  212. package/dist/types/index.js +0 -1
  213. package/dist/types.js +0 -1
  214. package/dist/utils.js +4 -5
  215. package/package.json +8 -8
@@ -1,195 +1,198 @@
1
- import { defineComponent as x, useModel as F, shallowRef as s, useTemplateRef as L, computed as k, onBeforeMount as T, watch as f, openBlock as w, createBlock as y, normalizeClass as H, withCtx as c, createElementBlock as K, Fragment as R, renderList as z, unref as N, renderSlot as p, createElementVNode as U, createVNode as A, mergeModels as $ } from "vue";
2
- import W from "./BaseInput.js";
3
- import j from "./BaseDropDown.vue.js";
4
- import '../assets/BaseDropDown.css';/* empty css */
5
- import { debounce as q } from "@wikicasa-dev/utilities";
6
- import G from "./BaseSelect/SelectItem.vue.js";
7
- import { useKeyboardController as J } from "@wikicasa-dev/vue-composables";
8
- const Q = ["innerHTML"], ae = /* @__PURE__ */ x({
9
- __name: "BaseAutocomplete",
10
- props: /* @__PURE__ */ $({
11
- isValid: { type: [Boolean, null], default: null },
12
- theme: { default: "" },
13
- label: { default: "" },
14
- disableCb: { type: Boolean, default: !1 },
15
- onInputChangeCb: { type: Function },
16
- onOptionSelectedCb: { type: [Function, null], default: null },
17
- keepState: { default: null },
18
- cleanupOnClose: { type: Boolean, default: !0 },
19
- dropdownClasses: { default: "" },
20
- closeDropdownOnBodyPressed: { type: Boolean, default: !0 },
21
- inputClasses: {},
22
- fieldsetClasses: {},
23
- dataCy: { default: "" }
24
- }, {
25
- modelValue: {
26
- default() {
27
- return { id: "", label: "" };
28
- }
29
- },
30
- modelModifiers: {}
31
- }),
32
- emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
33
- setup(t, { expose: g, emit: V }) {
34
- const u = F(t, "modelValue"), d = V, i = s(""), o = s([]), v = s(null), b = s(!1), n = s(!1), B = L("baseInput"), S = k(() => o.value.length);
35
- T(() => {
36
- v.value = q({ delay: 300 }, t.onInputChangeCb);
37
- });
38
- const { activeIdx: m, selectedIdx: h } = J({
39
- optionsLength: S,
40
- isDropdownOpen: n,
41
- disableSpaceHandler: !0
42
- }), O = k(() => {
43
- switch (t.theme) {
44
- case "bordered":
45
- return "";
46
- case "all-bordered":
47
- return "!uikit-rounded " + (n.value && "!uikit-rounded-b-none");
48
- case "all-bordered-thick":
49
- return "!uikit-rounded-xl !uikit-h-[52px] " + (n.value && "!uikit-rounded-b-none");
50
- default:
51
- return "";
52
- }
53
- }), I = k(() => {
54
- switch (t.theme) {
55
- case "bordered":
56
- return "";
57
- case "all-bordered":
58
- return "uikit-border uikit-border-w-lavender uikit-border-solid !uikit-rounded !uikit-border-w-lavender !uikit-border " + (n.value ? "!uikit-border-b-0 !uikit-rounded-b-none" : "");
59
- case "all-bordered-thick":
60
- return "!uikit-rounded-xl !uikit-h-[60px] !uikit-border-w-lavender !uikit-border-none " + (n.value ? "!uikit-rounded-b-none" : "");
61
- default:
62
- return "";
63
- }
64
- }), M = k(() => {
65
- const e = "uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mb-0 !uikit-mt-0 uikit-text-w-black !uikit-rounded-b-xl !uikit-rounded-t-none";
66
- switch (t.theme) {
67
- case "bordered":
68
- return "before:uikit-content-[''] before:uikit-absolute before:uikit-w-1/2 before:uikit-border-b before:uikit-border-b-w-lavender before:[border-bottom-style:solid] before:uikit-right-1/4 uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mt-5px uikit-mb-0";
69
- case "all-bordered":
70
- return e;
71
- case "all-bordered-thick":
72
- return e + " !uikit-border-0";
73
- default:
74
- return "";
75
- }
76
- }), D = async (e) => {
77
- if (i.value !== e && (d("changedValue", e), i.value = e, !!t.onInputChangeCb)) {
78
- if (!e || b.value) {
79
- o.value = [], b.value = !1, h.value = -1, m.value = -1, u.value && (u.value.label = ""), n.value = !1, await v.value?.(null);
80
- return;
81
- }
82
- t.disableCb || (o.value = await v.value?.(e) || [], n.value = !!o.value.length);
83
- }
84
- }, C = (e, l) => {
85
- t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (o.value = []), b.value = !0, i.value = e.label, u.value = e, n.value = !1, h.value = l;
86
- }, E = () => {
87
- o.value.length && t.keepState !== "closed" && (n.value = !0);
88
- };
89
- return f(
90
- u,
91
- (e, l) => {
92
- e === l || e?.label === i.value || (i.value = e?.label || "");
93
- },
94
- { immediate: !0 }
95
- ), f(h, (e) => {
96
- if (e === -1 || !o.value.length) return;
97
- const l = o.value[e];
98
- b.value && l.label === u.value?.label || C(l, e);
99
- }), f(
100
- () => t.keepState,
101
- (e) => {
102
- e === "closed" ? (n.value = !1, t.cleanupOnClose && (o.value = [])) : e === "open" && o.value.length && (n.value = !0);
103
- }
104
- ), f(n, (e) => {
105
- d("update:dropdownState", e);
106
- }), g({
107
- select: () => {
108
- B.value?.select();
109
- }
110
- }), (e, l) => (w(), y(j, {
111
- class: H(["uikit-autocomplete", e.$attrs["root-classes"]]),
112
- "data-cy": t.dataCy ? t.dataCy : `ac_${e.$attrs.id}`,
113
- "dropdown-element": "ul",
114
- "dropdown-classes": [
115
- { "bordered-dropdown": t.theme === "bordered" },
116
- { "all-bordered-dropdown": t.theme === "all-bordered" },
117
- { "all-bordered-dropdown thick": t.theme === "all-bordered-thick" },
118
- {
119
- "uikit-mt-10px !uikit-border !uikit-border-w-secondary !uikit-rounded-xs": !t.theme
120
- },
121
- M.value,
122
- "uikit-z-30",
123
- t.dropdownClasses
124
- ],
125
- open: n.value,
126
- "keep-state": !o.value.length || t.keepState === "closed" ? "closed" : "opened",
127
- "close-when-clicked-outside": t.closeDropdownOnBodyPressed,
128
- "activate-keyboard-controller": !1,
129
- "onUpdate:open": l[3] || (l[3] = (a) => n.value = a),
130
- onClick: l[4] || (l[4] = (a) => {
131
- d("click"), E();
132
- })
133
- }, {
134
- btn_slot: c(() => [
135
- A(W, {
136
- id: e.$attrs.id ? `ac_input_${e.$attrs.id}` : "",
137
- ref: "baseInput",
138
- "data-cy": t.dataCy ? `ac_input_${t.dataCy}` : `ac_input_${e.$attrs.id}`,
139
- "label-text": t.label,
140
- "model-value": i.value,
141
- "is-valid": t.isValid,
142
- disabled: e.$attrs.disabled,
143
- placeholder: e.$attrs.placeholder,
144
- "with-left-icon": !!e.$slots.lefticon,
145
- "with-right-icon": !!e.$slots.righticon,
146
- "input-class": [
147
- O.value,
148
- t.inputClasses,
149
- "!uikit-ml-0 !uikit-w-full"
150
- ],
151
- "fieldset-classes": [I.value, t.fieldsetClasses],
152
- "onUpdate:modelValue": l[0] || (l[0] = (a) => D(a === void 0 ? "" : `${a}`)),
153
- onKeydown: l[1] || (l[1] = (a) => d("keydown", a)),
154
- onKeydownEnterPressed: l[2] || (l[2] = () => d("keydownEnterPressed"))
155
- }, {
156
- leftIcon: c(() => [
157
- p(e.$slots, "lefticon")
158
- ]),
159
- righticon: c(({ handleClean: a }) => [
160
- p(e.$slots, "righticon", { handleClean: a })
161
- ]),
162
- _: 3
163
- }, 8, ["id", "data-cy", "label-text", "model-value", "is-valid", "disabled", "placeholder", "with-left-icon", "with-right-icon", "input-class", "fieldset-classes"])
164
- ]),
165
- default: c(() => [
166
- (w(!0), K(R, null, z(o.value, (a, r) => (w(), y(G, {
167
- key: r,
168
- active: N(m) === r,
169
- class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
170
- onClick: (P) => C(
171
- a,
172
- r
173
- ),
174
- onMouseover: (P) => m.value = r
175
- }, {
176
- default: c(() => [
177
- p(e.$slots, "option-content", {
178
- option: a,
179
- idx: r
180
- }, () => [
181
- U("span", {
182
- innerHTML: a.label
183
- }, null, 8, Q)
184
- ])
185
- ]),
186
- _: 2
187
- }, 1032, ["active", "onClick", "onMouseover"]))), 128))
188
- ]),
189
- _: 3
190
- }, 8, ["class", "data-cy", "dropdown-classes", "open", "keep-state", "close-when-clicked-outside"]));
191
- }
1
+ import e from "./BaseSelect/SelectItem.js";
2
+ import t from "./BaseDropDown.js";
3
+ import n from "./BaseInput.js";
4
+ import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, mergeModels as u, normalizeClass as d, onBeforeMount as f, openBlock as p, renderList as m, renderSlot as h, shallowRef as g, unref as _, useModel as v, useTemplateRef as y, watch as b, withCtx as x } from "vue";
5
+ import { debounce as S } from "@wikicasa-dev/utilities";
6
+ import { useKeyboardController as C } from "@wikicasa-dev/vue-composables";
7
+ import '../assets/BaseAutocomplete.css';//#region lib/UIKit/BaseAutocomplete.vue?vue&type=script&setup=true&lang.ts
8
+ var w = ["innerHTML"], T = /*@__PURE__*/ l({
9
+ __name: "BaseAutocomplete",
10
+ props: /*@__PURE__*/ u({
11
+ isValid: {
12
+ type: [Boolean, null],
13
+ default: null
14
+ },
15
+ theme: { default: "" },
16
+ label: { default: "" },
17
+ disableCb: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ onInputChangeCb: { type: Function },
22
+ onOptionSelectedCb: {
23
+ type: [Function, null],
24
+ default: null
25
+ },
26
+ keepState: { default: null },
27
+ cleanupOnClose: {
28
+ type: Boolean,
29
+ default: !0
30
+ },
31
+ dropdownClasses: { default: "" },
32
+ closeDropdownOnBodyPressed: {
33
+ type: Boolean,
34
+ default: !0
35
+ },
36
+ inputClasses: {},
37
+ fieldsetClasses: {},
38
+ dataCy: { default: "" }
39
+ }, {
40
+ modelValue: { default() {
41
+ return {
42
+ id: "",
43
+ label: ""
44
+ };
45
+ } },
46
+ modelModifiers: {}
47
+ }),
48
+ emits: /*@__PURE__*/ u([
49
+ "update:dropdownState",
50
+ "changedValue",
51
+ "click",
52
+ "keydown",
53
+ "keydownEnterPressed"
54
+ ], ["update:modelValue"]),
55
+ setup(l, { expose: u, emit: T }) {
56
+ let E = v(l, "modelValue"), D = T, O = g(""), k = g([]), A = g(null), j = g(!1), M = g(!1), N = y("baseInput"), P = i(() => k.value.length);
57
+ f(() => {
58
+ A.value = S({ delay: 300 }, l.onInputChangeCb);
59
+ });
60
+ let { activeIdx: F, selectedIdx: I } = C({
61
+ optionsLength: P,
62
+ isDropdownOpen: M,
63
+ disableSpaceHandler: !0
64
+ }), L = i(() => {
65
+ switch (l.theme) {
66
+ case "bordered": return "";
67
+ case "all-bordered": return "!uikit-rounded " + (M.value && "!uikit-rounded-b-none");
68
+ case "all-bordered-thick": return "!uikit-rounded-xl !uikit-h-[52px] " + (M.value && "!uikit-rounded-b-none");
69
+ default: return "";
70
+ }
71
+ }), R = i(() => {
72
+ switch (l.theme) {
73
+ case "bordered": return "";
74
+ case "all-bordered": return "uikit-border uikit-border-w-lavender uikit-border-solid !uikit-rounded !uikit-border-w-lavender !uikit-border " + (M.value ? "!uikit-border-b-0 !uikit-rounded-b-none" : "");
75
+ case "all-bordered-thick": return "!uikit-rounded-xl !uikit-h-[60px] !uikit-border-w-lavender !uikit-border-none " + (M.value ? "!uikit-rounded-b-none" : "");
76
+ default: return "";
77
+ }
78
+ }), z = i(() => {
79
+ switch (l.theme) {
80
+ case "bordered": return "before:uikit-content-[''] before:uikit-absolute before:uikit-w-1/2 before:uikit-border-b before:uikit-border-b-w-lavender before:[border-bottom-style:solid] before:uikit-right-1/4 uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mt-5px uikit-mb-0";
81
+ case "all-bordered": return "uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mb-0 !uikit-mt-0 uikit-text-w-black !uikit-rounded-b-xl !uikit-rounded-t-none";
82
+ case "all-bordered-thick": return "uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mb-0 !uikit-mt-0 uikit-text-w-black !uikit-rounded-b-xl !uikit-rounded-t-none !uikit-border-0";
83
+ default: return "";
84
+ }
85
+ }), B = async (e) => {
86
+ if (O.value !== e && (D("changedValue", e), O.value = e, l.onInputChangeCb)) {
87
+ if (!e || j.value) {
88
+ k.value = [], j.value = !1, I.value = -1, F.value = -1, E.value && (E.value.label = ""), M.value = !1, await A.value?.(null);
89
+ return;
90
+ }
91
+ l.disableCb || (k.value = await A.value?.(e) || [], M.value = !!k.value.length);
92
+ }
93
+ }, V = (e, t) => {
94
+ l.onOptionSelectedCb && l.onOptionSelectedCb(e), l.cleanupOnClose && (k.value = []), j.value = !0, O.value = e.label, E.value = e, M.value = !1, I.value = t;
95
+ }, H = () => {
96
+ k.value.length && l.keepState !== "closed" && (M.value = !0);
97
+ };
98
+ return b(E, (e, t) => {
99
+ e === t || e?.label === O.value || (O.value = e?.label || "");
100
+ }, { immediate: !0 }), b(I, (e) => {
101
+ if (e === -1 || !k.value.length) return;
102
+ let t = k.value[e];
103
+ j.value && t.label === E.value?.label || V(t, e);
104
+ }), b(() => l.keepState, (e) => {
105
+ e === "closed" ? (M.value = !1, l.cleanupOnClose && (k.value = [])) : e === "open" && k.value.length && (M.value = !0);
106
+ }), b(M, (e) => {
107
+ D("update:dropdownState", e);
108
+ }), u({ select: () => {
109
+ N.value?.select();
110
+ } }), (i, u) => (p(), a(t, {
111
+ class: d(["uikit-autocomplete", i.$attrs["root-classes"]]),
112
+ "data-cy": l.dataCy ? l.dataCy : `ac_${i.$attrs.id}`,
113
+ "dropdown-element": "ul",
114
+ "dropdown-classes": [
115
+ { "bordered-dropdown": l.theme === "bordered" },
116
+ { "all-bordered-dropdown": l.theme === "all-bordered" },
117
+ { "all-bordered-dropdown thick": l.theme === "all-bordered-thick" },
118
+ { "uikit-mt-10px !uikit-border !uikit-border-w-secondary !uikit-rounded-xs": !l.theme },
119
+ z.value,
120
+ "uikit-z-30",
121
+ l.dropdownClasses
122
+ ],
123
+ open: M.value,
124
+ "keep-state": !k.value.length || l.keepState === "closed" ? "closed" : "opened",
125
+ "close-when-clicked-outside": l.closeDropdownOnBodyPressed,
126
+ "activate-keyboard-controller": !1,
127
+ "onUpdate:open": u[3] ||= (e) => M.value = e,
128
+ onClick: u[4] ||= (e) => {
129
+ D("click"), H();
130
+ }
131
+ }, {
132
+ btn_slot: x(() => [c(n, {
133
+ id: i.$attrs.id ? `ac_input_${i.$attrs.id}` : "",
134
+ ref: "baseInput",
135
+ "data-cy": l.dataCy ? `ac_input_${l.dataCy}` : `ac_input_${i.$attrs.id}`,
136
+ "label-text": l.label,
137
+ "model-value": O.value,
138
+ "is-valid": l.isValid,
139
+ disabled: i.$attrs.disabled,
140
+ placeholder: i.$attrs.placeholder,
141
+ "with-left-icon": !!i.$slots.lefticon,
142
+ "with-right-icon": !!i.$slots.righticon,
143
+ "input-class": [
144
+ L.value,
145
+ l.inputClasses,
146
+ "!uikit-ml-0 !uikit-w-full"
147
+ ],
148
+ "fieldset-classes": [R.value, l.fieldsetClasses],
149
+ "onUpdate:modelValue": u[0] ||= (e) => B(e === void 0 ? "" : `${e}`),
150
+ onKeydown: u[1] ||= (e) => D("keydown", e),
151
+ onKeydownEnterPressed: u[2] ||= () => D("keydownEnterPressed")
152
+ }, {
153
+ leftIcon: x(() => [h(i.$slots, "lefticon")]),
154
+ righticon: x(({ handleClean: e }) => [h(i.$slots, "righticon", { handleClean: e })]),
155
+ _: 3
156
+ }, 8, [
157
+ "id",
158
+ "data-cy",
159
+ "label-text",
160
+ "model-value",
161
+ "is-valid",
162
+ "disabled",
163
+ "placeholder",
164
+ "with-left-icon",
165
+ "with-right-icon",
166
+ "input-class",
167
+ "fieldset-classes"
168
+ ])]),
169
+ default: x(() => [(p(!0), o(r, null, m(k.value, (t, n) => (p(), a(e, {
170
+ key: n,
171
+ active: _(F) === n,
172
+ class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
173
+ onClick: (e) => V(t, n),
174
+ onMouseover: (e) => F.value = n
175
+ }, {
176
+ default: x(() => [h(i.$slots, "option-content", {
177
+ option: t,
178
+ idx: n
179
+ }, () => [s("span", { innerHTML: t.label }, null, 8, w)])]),
180
+ _: 2
181
+ }, 1032, [
182
+ "active",
183
+ "onClick",
184
+ "onMouseover"
185
+ ]))), 128))]),
186
+ _: 3
187
+ }, 8, [
188
+ "class",
189
+ "data-cy",
190
+ "dropdown-classes",
191
+ "open",
192
+ "keep-state",
193
+ "close-when-clicked-outside"
194
+ ]));
195
+ }
192
196
  });
193
- export {
194
- ae as default
195
- };
197
+ //#endregion
198
+ export { T as default };
@@ -1,5 +1,5 @@
1
- import o from "./BaseBadge.vue.js";
2
- import '../assets/BaseBadge.css';/* empty css */
3
- export {
4
- o as default
5
- };
1
+ import e from "./BaseBadge.vue.js";
2
+ //#region lib/UIKit/BaseBadge.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -1,18 +1,18 @@
1
- import { defineComponent as a, openBlock as t, createElementBlock as o, normalizeClass as r, renderSlot as d } from "vue";
2
- const i = ["id"], m = /* @__PURE__ */ a({
3
- __name: "BaseBadge",
4
- props: {
5
- badgeClass: { default: "uikit-badge-w-primary-sm" }
6
- },
7
- setup(s) {
8
- return (e, l) => (t(), o("span", {
9
- id: e.$attrs.id,
10
- class: r(["uikit-badge uikit-shadow-sm", s.badgeClass, e.$attrs.class])
11
- }, [
12
- d(e.$slots, "default")
13
- ], 10, i));
14
- }
1
+ import { createElementBlock as e, defineComponent as t, normalizeClass as n, openBlock as r, renderSlot as i } from "vue";
2
+ import '../assets/BaseBadge.css';//#region lib/UIKit/BaseBadge.vue?vue&type=script&setup=true&lang.ts
3
+ var a = ["id"], o = /*@__PURE__*/ t({
4
+ __name: "BaseBadge",
5
+ props: { badgeClass: { default: "uikit-badge-w-primary-sm" } },
6
+ setup(t) {
7
+ return (o, s) => (r(), e("span", {
8
+ id: o.$attrs.id,
9
+ class: n([
10
+ "uikit-badge uikit-shadow-sm",
11
+ t.badgeClass,
12
+ o.$attrs.class
13
+ ])
14
+ }, [i(o.$slots, "default")], 10, a));
15
+ }
15
16
  });
16
- export {
17
- m as default
18
- };
17
+ //#endregion
18
+ export { o as default };
@@ -1,4 +1,5 @@
1
- import f from "./BaseBreadcrumb.vue.js";
2
- export {
3
- f as default
4
- };
1
+ import e from "./BaseBreadcrumb.vue.js";
2
+ //#region lib/UIKit/BaseBreadcrumb.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -1,57 +1,40 @@
1
- import { defineComponent as d, computed as k, openBlock as l, createElementBlock as i, createElementVNode as n, normalizeClass as r, Fragment as u, renderList as h, renderSlot as c, toDisplayString as b, createVNode as f, unref as p } from "vue";
2
- import { ArrowIcon as C } from "@wikicasa-dev/svg-icons";
3
- const g = { "aria-label": "Breadcrumb" }, w = ["data-tooltip"], I = ["href"], y = /* @__PURE__ */ d({
4
- __name: "BaseBreadcrumb",
5
- props: {
6
- items: {},
7
- listClasses: {},
8
- listItemClasses: {}
9
- },
10
- setup(t) {
11
- const m = k(() => {
12
- let e = 0;
13
- const a = [];
14
- for (; e < t.items.length; )
15
- a.push({ ...t.items[e], idx: e }), e < t.items.length - 1 && a.push({ arrowIcon: !0 }), e++;
16
- return a;
17
- });
18
- return (e, a) => (l(), i("nav", g, [
19
- n("ol", {
20
- class: r(["uikit-flex uikit-items-center uikit-gap-10px uikit-p-0", t.listClasses])
21
- }, [
22
- (l(!0), i(u, null, h(m.value, (s, o) => (l(), i(u, null, [
23
- s?.label ? (l(), i("li", {
24
- key: `breadcrumb-li-${o}`,
25
- class: r(["uikit-list-none", t.listItemClasses]),
26
- "data-tooltip": s.dataTooltip
27
- }, [
28
- c(e.$slots, "item", {
29
- item: s
30
- }, () => [
31
- n("a", {
32
- class: r(["uikit-text-w-black uikit-no-underline", { "uikit-text-w-primary": s.active }]),
33
- href: s.link
34
- }, b(s.label), 11, I)
35
- ])
36
- ], 10, w)) : (l(), i("li", {
37
- key: `breadcrumb-li-no-label-${o}`,
38
- class: r(["uikit-list-none", t.listItemClasses]),
39
- "aria-hidden": "true"
40
- }, [
41
- c(e.$slots, "separator", {}, () => [
42
- f(p(C), {
43
- class: "-uikit-rotate-90",
44
- "stroke-color": "#222",
45
- width: 10,
46
- height: 10
47
- })
48
- ])
49
- ], 2))
50
- ], 64))), 256))
51
- ], 2)
52
- ]));
53
- }
1
+ import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, renderList as c, renderSlot as l, toDisplayString as u, unref as d } from "vue";
2
+ import { ArrowIcon as f } from "@wikicasa-dev/svg-icons";
3
+ //#region lib/UIKit/BaseBreadcrumb.vue?vue&type=script&setup=true&lang.ts
4
+ var p = { "aria-label": "Breadcrumb" }, m = ["data-tooltip"], h = ["href"], g = /*@__PURE__*/ a({
5
+ __name: "BaseBreadcrumb",
6
+ props: {
7
+ items: {},
8
+ listClasses: {},
9
+ listItemClasses: {}
10
+ },
11
+ setup(a) {
12
+ let g = t(() => {
13
+ let e = 0, t = [];
14
+ for (; e < a.items.length;) t.push({
15
+ ...a.items[e],
16
+ idx: e
17
+ }), e < a.items.length - 1 && t.push({ arrowIcon: !0 }), e++;
18
+ return t;
19
+ });
20
+ return (t, _) => (s(), n("nav", p, [r("ol", { class: o(["uikit-flex uikit-items-center uikit-gap-10px uikit-p-0", a.listClasses]) }, [(s(!0), n(e, null, c(g.value, (c, p) => (s(), n(e, null, [c?.label ? (s(), n("li", {
21
+ key: `breadcrumb-li-${p}`,
22
+ class: o(["uikit-list-none", a.listItemClasses]),
23
+ "data-tooltip": c.dataTooltip
24
+ }, [l(t.$slots, "item", { item: c }, () => [r("a", {
25
+ class: o(["uikit-text-w-black uikit-no-underline", { "uikit-text-w-primary": c.active }]),
26
+ href: c.link
27
+ }, u(c.label), 11, h)])], 10, m)) : (s(), n("li", {
28
+ key: `breadcrumb-li-no-label-${p}`,
29
+ class: o(["uikit-list-none", a.listItemClasses]),
30
+ "aria-hidden": "true"
31
+ }, [l(t.$slots, "separator", {}, () => [i(d(f), {
32
+ class: "-uikit-rotate-90",
33
+ "stroke-color": "#222",
34
+ width: 10,
35
+ height: 10
36
+ })])], 2))], 64))), 256))], 2)]));
37
+ }
54
38
  });
55
- export {
56
- y as default
57
- };
39
+ //#endregion
40
+ export { g as default };
@@ -1,4 +1,5 @@
1
- import f from "./BaseButton.vue.js";
2
- export {
3
- f as default
4
- };
1
+ import e from "./BaseButton.vue.js";
2
+ //#region lib/UIKit/BaseButton.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };