@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,153 +1,172 @@
1
- import { defineComponent as N, useId as T, useModel as I, shallowRef as R, computed as V, useTemplateRef as x, onMounted as z, onUnmounted as P, watch as v, nextTick as q, openBlock as m, createElementBlock as F, normalizeClass as s, renderSlot as A, unref as l, createVNode as U, withCtx as B, createElementVNode as j, createBlock as L, createCommentVNode as G, resolveDynamicComponent as J, mergeProps as Q, mergeModels as D } from "vue";
2
- import X from "./BaseButton.vue.js";
3
- import { ArrowIcon as Y } from "@wikicasa-dev/svg-icons";
4
- import { useKeyboardController as Z } from "../composables/mock.js";
5
- const _ = ["innerHTML"], le = /* @__PURE__ */ N({
6
- inheritAttrs: !1,
7
- __name: "BaseDropDown",
8
- props: /* @__PURE__ */ D({
9
- dropdownAttrs: {},
10
- dropdownClasses: { default: "" },
11
- btnClasses: { default: "" },
12
- withArrowIcon: { type: Boolean, default: !1 },
13
- btnLabel: { default: "" },
14
- labelClasses: { default: "" },
15
- direction: { default: "down" },
16
- arrowWidth: { default: 12 },
17
- arrowStrokeColor: { default: void 0 },
18
- isAbsolute: { type: Boolean, default: !0 },
19
- closeWhenClickedOutside: { type: Boolean, default: !0 },
20
- dropdownElement: { default: "div" },
21
- keepState: { default: "" },
22
- activateKeyboardController: { type: Boolean, default: !0 },
23
- closeKeys: { type: [Boolean, Array], default: () => ["Escape", "Enter"] },
24
- dataCy: { default: "" }
25
- }, {
26
- resetKeyboardController: { type: Boolean, default: !1 },
27
- resetKeyboardControllerModifiers: {},
28
- open: { type: Boolean, default: !1 },
29
- openModifiers: {}
30
- }),
31
- emits: /* @__PURE__ */ D(["click"], ["update:resetKeyboardController", "update:open"]),
32
- setup(t, { expose: S, emit: M }) {
33
- const n = t, y = T(), O = M, w = I(
34
- t,
35
- "resetKeyboardController"
36
- ), o = I(t, "open");
37
- let C = !1;
38
- const u = R([]), W = V(() => u.value.length), a = x("container"), c = x("dropdown"), { activeIdx: i, selectedIdx: r, onKeyDownHandler: $ } = Z({
39
- optionsLength: W,
40
- isDropdownOpen: o,
41
- global: !1,
42
- closeKeys: n.closeKeys ? n.closeKeys : []
43
- }), b = () => {
44
- o.value = !1;
45
- }, h = ({ target: e }) => {
46
- a.value?.contains(e) || b();
47
- }, p = ({ target: e }) => {
48
- o.value && e instanceof Node && (a.value?.contains(e) || a.value && e.contains(a.value) || b());
49
- }, H = (e) => {
50
- n.activateKeyboardController && $(e);
51
- }, f = () => {
52
- n.keepState === "closed" && !o.value || n.keepState === "opened" && o.value || (o.value = !o.value);
53
- }, K = (e) => {
54
- e != null && (i.value = e);
55
- }, g = (e) => {
56
- e != null && (r.value = e);
57
- }, E = () => {
58
- c.value && (u.value = Array.from(c.value.children));
59
- };
60
- return z(() => {
61
- E();
62
- }), P(() => {
63
- n.closeWhenClickedOutside && (document.removeEventListener("click", h), document.removeEventListener("focusin", p));
64
- }), v(w, (e) => {
65
- e && (i.value = -1, r.value = -1, q(() => {
66
- E(), w.value = !1;
67
- }));
68
- }), v(o, (e) => {
69
- !e || C || !n.closeWhenClickedOutside || (document.addEventListener("click", h), document.addEventListener("focusin", p), C = !0);
70
- }), v(r, (e) => {
71
- e !== -1 && u.value[e]?.querySelector("a")?.click();
72
- }), S({
73
- activeIdx: i,
74
- selectedIdx: r,
75
- getRootElement: () => a.value,
76
- getContentElement: () => c.value
77
- }), (e, d) => (m(), F("div", {
78
- ref: "container",
79
- class: s(["uikit-relative uikit-block", e.$attrs.class]),
80
- onKeydown: H
81
- }, [
82
- A(e.$slots, "btn_slot", {
83
- toggleDropdown: f,
84
- isOpen: o.value,
85
- activeIdx: l(i),
86
- setActiveIdx: K,
87
- setSelectedIdx: g
88
- }, () => [
89
- U(X, {
90
- id: l(y),
91
- type: "button",
92
- "data-cy": t.dataCy,
93
- class: s([
94
- "!uikit-flex uikit-w-full uikit-items-center uikit-truncate",
95
- t.btnClasses
96
- ]),
97
- "aria-expanded": o.value,
98
- "btn-class": "uikit-btn-single-selection",
99
- onClick: d[0] || (d[0] = (k) => {
100
- O("click"), f();
101
- }),
102
- onKeydown: d[1] || (d[1] = (k) => {
103
- Array.isArray(t.closeKeys) && !t.closeKeys.includes(k.key) || k.stopPropagation();
104
- })
105
- }, {
106
- default: B(() => [
107
- j("span", {
108
- class: s(["uikit-mr-5px", t.labelClasses]),
109
- innerHTML: t.btnLabel
110
- }, null, 10, _),
111
- t.withArrowIcon ? (m(), L(l(Y), {
112
- key: 0,
113
- class: s(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", o.value ? "uikit-rotate-180" : ""]),
114
- width: t.arrowWidth,
115
- height: t.arrowWidth,
116
- "stroke-color": t.arrowStrokeColor
117
- }, null, 8, ["class", "width", "height", "stroke-color"])) : G("", !0)
118
- ]),
119
- _: 1
120
- }, 8, ["id", "data-cy", "class", "aria-expanded"])
121
- ]),
122
- (m(), L(J(t.dropdownElement), Q({
123
- id: "dropdown_" + l(y),
124
- ref: "dropdown",
125
- "data-cy": t.dataCy && `${t.dataCy}_dropdown`,
126
- class: ["uikit-dropdown-content uikit-w-full uikit-flex-col uikit-overflow-y-auto uikit-border-solid uikit-bg-white uikit-pl-0 uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
127
- t.dropdownClasses,
128
- o.value ? "uikit-flex" : "uikit-hidden",
129
- { "uikit-bottom-[55px]": t.direction === "up" },
130
- { "uikit-absolute": t.isAbsolute }
131
- ]],
132
- "aria-hidden": !o.value,
133
- "data-side": t.direction,
134
- tabindex: "-1"
135
- }, t.dropdownAttrs), {
136
- default: B(() => [
137
- A(e.$slots, "default", {
138
- isOpen: o.value,
139
- toggleDropdown: f,
140
- activeIdx: l(i),
141
- selectedIdx: l(r),
142
- setActiveIdx: K,
143
- setSelectedIdx: g
144
- })
145
- ]),
146
- _: 3
147
- }, 16, ["id", "data-cy", "class", "aria-hidden", "data-side"]))
148
- ], 34));
149
- }
1
+ import e from "./BaseButton.js";
2
+ import { useKeyboardController as t } from "../composables/mock.js";
3
+ import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, mergeModels as l, mergeProps as u, nextTick as d, normalizeClass as f, onMounted as p, onUnmounted as m, openBlock as h, renderSlot as g, resolveDynamicComponent as _, shallowRef as v, unref as y, useId as b, useModel as x, useTemplateRef as S, watch as C, withCtx as w } from "vue";
4
+ import { ArrowIcon as T } from "@wikicasa-dev/svg-icons";
5
+ import '../assets/BaseDropDown.css';//#region lib/UIKit/BaseDropDown.vue?vue&type=script&setup=true&lang.ts
6
+ var E = ["innerHTML"], D = /*@__PURE__*/ c({
7
+ inheritAttrs: !1,
8
+ __name: "BaseDropDown",
9
+ props: /*@__PURE__*/ l({
10
+ dropdownAttrs: {},
11
+ dropdownClasses: { default: "" },
12
+ btnClasses: { default: "" },
13
+ withArrowIcon: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ btnLabel: { default: "" },
18
+ labelClasses: { default: "" },
19
+ direction: { default: "down" },
20
+ arrowWidth: { default: 12 },
21
+ arrowStrokeColor: { default: void 0 },
22
+ isAbsolute: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ closeWhenClickedOutside: {
27
+ type: Boolean,
28
+ default: !0
29
+ },
30
+ dropdownElement: { default: "div" },
31
+ keepState: { default: "" },
32
+ activateKeyboardController: {
33
+ type: Boolean,
34
+ default: !0
35
+ },
36
+ closeKeys: {
37
+ type: [Boolean, Array],
38
+ default: () => ["Escape", "Enter"]
39
+ },
40
+ dataCy: { default: "" }
41
+ }, {
42
+ resetKeyboardController: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ resetKeyboardControllerModifiers: {},
47
+ open: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ openModifiers: {}
52
+ }),
53
+ emits: /*@__PURE__*/ l(["click"], ["update:resetKeyboardController", "update:open"]),
54
+ setup(c, { expose: l, emit: D }) {
55
+ let O = c, k = b(), A = D, j = x(c, "resetKeyboardController"), M = x(c, "open"), N = !1, P = v([]), F = n(() => P.value.length), I = S("container"), L = S("dropdown"), { activeIdx: R, selectedIdx: z, onKeyDownHandler: B } = t({
56
+ optionsLength: F,
57
+ isDropdownOpen: M,
58
+ global: !1,
59
+ closeKeys: O.closeKeys ? O.closeKeys : []
60
+ }), V = () => {
61
+ M.value = !1;
62
+ }, H = ({ target: e }) => {
63
+ I.value?.contains(e) || V();
64
+ }, U = ({ target: e }) => {
65
+ M.value && e instanceof Node && (I.value?.contains(e) || I.value && e.contains(I.value) || V());
66
+ }, W = (e) => {
67
+ O.activateKeyboardController && B(e);
68
+ }, G = () => {
69
+ O.keepState === "closed" && !M.value || O.keepState === "opened" && M.value || (M.value = !M.value);
70
+ }, K = (e) => {
71
+ e != null && (R.value = e);
72
+ }, q = (e) => {
73
+ e != null && (z.value = e);
74
+ }, J = () => {
75
+ L.value && (P.value = Array.from(L.value.children));
76
+ };
77
+ return p(() => {
78
+ J();
79
+ }), m(() => {
80
+ O.closeWhenClickedOutside && (document.removeEventListener("click", H), document.removeEventListener("focusin", U));
81
+ }), C(j, (e) => {
82
+ e && (R.value = -1, z.value = -1, d(() => {
83
+ J(), j.value = !1;
84
+ }));
85
+ }), C(M, (e) => {
86
+ !e || N || !O.closeWhenClickedOutside || (document.addEventListener("click", H), document.addEventListener("focusin", U), N = !0);
87
+ }), C(z, (e) => {
88
+ e !== -1 && P.value[e]?.querySelector("a")?.click();
89
+ }), l({
90
+ activeIdx: R,
91
+ selectedIdx: z,
92
+ getRootElement: () => I.value,
93
+ getContentElement: () => L.value
94
+ }), (t, n) => (h(), a("div", {
95
+ ref: "container",
96
+ class: f(["uikit-relative uikit-block", t.$attrs.class]),
97
+ onKeydown: W
98
+ }, [g(t.$slots, "btn_slot", {
99
+ toggleDropdown: G,
100
+ isOpen: M.value,
101
+ activeIdx: y(R),
102
+ setActiveIdx: K,
103
+ setSelectedIdx: q
104
+ }, () => [s(e, {
105
+ id: y(k),
106
+ type: "button",
107
+ "data-cy": c.dataCy,
108
+ class: f(["!uikit-flex uikit-w-full uikit-items-center uikit-truncate", c.btnClasses]),
109
+ "aria-expanded": M.value,
110
+ "btn-class": "uikit-btn-single-selection",
111
+ onClick: n[0] ||= (e) => {
112
+ A("click"), G();
113
+ },
114
+ onKeydown: n[1] ||= (e) => {
115
+ Array.isArray(c.closeKeys) && !c.closeKeys.includes(e.key) || e.stopPropagation();
116
+ }
117
+ }, {
118
+ default: w(() => [o("span", {
119
+ class: f(["uikit-mr-5px", c.labelClasses]),
120
+ innerHTML: c.btnLabel
121
+ }, null, 10, E), c.withArrowIcon ? (h(), r(y(T), {
122
+ key: 0,
123
+ class: f(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", M.value ? "uikit-rotate-180" : ""]),
124
+ width: c.arrowWidth,
125
+ height: c.arrowWidth,
126
+ "stroke-color": c.arrowStrokeColor
127
+ }, null, 8, [
128
+ "class",
129
+ "width",
130
+ "height",
131
+ "stroke-color"
132
+ ])) : i("", !0)]),
133
+ _: 1
134
+ }, 8, [
135
+ "id",
136
+ "data-cy",
137
+ "class",
138
+ "aria-expanded"
139
+ ])]), (h(), r(_(c.dropdownElement), u({
140
+ id: "dropdown_" + y(k),
141
+ ref: "dropdown",
142
+ "data-cy": c.dataCy && `${c.dataCy}_dropdown`,
143
+ class: ["uikit-dropdown-content uikit-w-full uikit-flex-col uikit-overflow-y-auto uikit-border-solid uikit-bg-white uikit-pl-0 uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
144
+ c.dropdownClasses,
145
+ M.value ? "uikit-flex" : "uikit-hidden",
146
+ { "uikit-bottom-[55px]": c.direction === "up" },
147
+ { "uikit-absolute": c.isAbsolute }
148
+ ]],
149
+ "aria-hidden": !M.value,
150
+ "data-side": c.direction,
151
+ tabindex: "-1"
152
+ }, c.dropdownAttrs), {
153
+ default: w(() => [g(t.$slots, "default", {
154
+ isOpen: M.value,
155
+ toggleDropdown: G,
156
+ activeIdx: y(R),
157
+ selectedIdx: y(z),
158
+ setActiveIdx: K,
159
+ setSelectedIdx: q
160
+ })]),
161
+ _: 3
162
+ }, 16, [
163
+ "id",
164
+ "data-cy",
165
+ "class",
166
+ "aria-hidden",
167
+ "data-side"
168
+ ]))], 34));
169
+ }
150
170
  });
151
- export {
152
- le as default
153
- };
171
+ //#endregion
172
+ export { D as default };
@@ -1,7 +1,6 @@
1
- import o from "./BaseFloatingLabel.vue.js";
2
- import '../assets/BaseFloatingLabel2.css';/* empty css */
3
- import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c94b9c9e"]]);
5
- export {
6
- c as default
7
- };
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./BaseFloatingLabel.vue.js";
3
+ //#region lib/UIKit/BaseFloatingLabel.vue
4
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-c94b9c9e"]]);
5
+ //#endregion
6
+ export { n as default };
@@ -1,40 +1,44 @@
1
- import { defineComponent as u, openBlock as a, createElementBlock as n, withModifiers as d, normalizeClass as t, createElementVNode as r, createCommentVNode as k } from "vue";
2
- const b = ["for"], c = ["innerHTML"], x = /* @__PURE__ */ u({
3
- __name: "BaseFloatingLabel",
4
- props: {
5
- labelState: { default: "inline-label" },
6
- isValid: { type: [Boolean, null], default: null },
7
- labelText: {},
8
- disabled: { type: [String, Boolean], default: !1 },
9
- labelClasses: {},
10
- labelTextClasses: {}
11
- },
12
- emits: ["click"],
13
- setup(e, { emit: s }) {
14
- const o = s;
15
- return (i, l) => (a(), n("label", {
16
- for: i.$attrs.for,
17
- class: t(["uikit-pointer-events-none uikit-absolute uikit-left-15px uikit-h-5", [e.labelState, { "uikit-text-w-secondary": e.disabled }, e.labelClasses]]),
18
- onClick: l[0] || (l[0] = d((m) => o("click"), ["stop"]))
19
- }, [
20
- r("span", {
21
- class: t(["uikit-font-medium [font-size:inherit]", [
22
- e.disabled ? "uikit-text-w-secondary" : "uikit-text-w-black",
23
- e.labelTextClasses
24
- ]]),
25
- innerHTML: e.labelText
26
- }, null, 10, c),
27
- i.$attrs.required ? (a(), n("sup", {
28
- key: 0,
29
- class: t(["uikit-absolute -uikit-top-[0.4em] uikit-pl-[2px] uikit-leading-normal [font-size:inherit]", [
30
- { "uikit-text-w-secondary": e.disabled },
31
- { "uikit-text-w-danger": e.isValid === !1 },
32
- { "uikit-text-w-primary": (e.isValid || e.isValid === null) && !e.disabled }
33
- ]])
34
- }, " *", 2)) : k("", !0)
35
- ], 10, b));
36
- }
1
+ import { createCommentVNode as e, createElementBlock as t, createElementVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, withModifiers as o } from "vue";
2
+ import '../assets/BaseFloatingLabel2.css';//#region lib/UIKit/BaseFloatingLabel.vue?vue&type=script&setup=true&lang.ts
3
+ var s = ["for"], c = ["innerHTML"], l = /*@__PURE__*/ r({
4
+ __name: "BaseFloatingLabel",
5
+ props: {
6
+ labelState: { default: "inline-label" },
7
+ isValid: {
8
+ type: [Boolean, null],
9
+ default: null
10
+ },
11
+ labelText: {},
12
+ disabled: {
13
+ type: [String, Boolean],
14
+ default: !1
15
+ },
16
+ labelClasses: {},
17
+ labelTextClasses: {}
18
+ },
19
+ emits: ["click"],
20
+ setup(r, { emit: l }) {
21
+ let u = l;
22
+ return (l, d) => (a(), t("label", {
23
+ for: l.$attrs.for,
24
+ class: i(["uikit-pointer-events-none uikit-absolute uikit-left-15px uikit-h-5", [
25
+ r.labelState,
26
+ { "uikit-text-w-secondary": r.disabled },
27
+ r.labelClasses
28
+ ]]),
29
+ onClick: d[0] ||= o((e) => u("click"), ["stop"])
30
+ }, [n("span", {
31
+ class: i(["uikit-font-medium [font-size:inherit]", [r.disabled ? "uikit-text-w-secondary" : "uikit-text-w-black", r.labelTextClasses]]),
32
+ innerHTML: r.labelText
33
+ }, null, 10, c), l.$attrs.required ? (a(), t("sup", {
34
+ key: 0,
35
+ class: i(["uikit-absolute -uikit-top-[0.4em] uikit-pl-[2px] uikit-leading-normal [font-size:inherit]", [
36
+ { "uikit-text-w-secondary": r.disabled },
37
+ { "uikit-text-w-danger": r.isValid === !1 },
38
+ { "uikit-text-w-primary": (r.isValid || r.isValid === null) && !r.disabled }
39
+ ]])
40
+ }, " *", 2)) : e("", !0)], 10, s));
41
+ }
37
42
  });
38
- export {
39
- x as default
40
- };
43
+ //#endregion
44
+ export { l as default };
@@ -1,7 +1,6 @@
1
- import o from "./BaseInput.vue.js";
2
- import '../assets/BaseInput2.css';/* empty css */
3
- import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f25fc601"]]);
5
- export {
6
- a as default
7
- };
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./BaseInput.vue.js";
3
+ //#region lib/UIKit/BaseInput.vue
4
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-bf36cdd7"]]);
5
+ //#endregion
6
+ export { n as default };