@wikicasa-dev/components 2.3.1-alpha.1 → 2.3.1-alpha.11

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 (53) hide show
  1. package/dist/Swiper/autoplay.js +1 -1
  2. package/dist/Swiper/controller.js +1 -1
  3. package/dist/Swiper/keyboard.js +1 -1
  4. package/dist/Swiper/thumbs.js +1 -1
  5. package/dist/UIKit/Accordion/AccordionContentPrimitive.d.ts +19 -0
  6. package/dist/UIKit/Accordion/AccordionContentPrimitive.js +4 -0
  7. package/dist/UIKit/Accordion/AccordionHeaderPrimitive.d.ts +11 -0
  8. package/dist/UIKit/Accordion/AccordionHeaderPrimitive.js +4 -0
  9. package/dist/UIKit/Accordion/AccordionItemPrimitive.d.ts +13 -0
  10. package/dist/UIKit/Accordion/AccordionItemPrimitive.js +4 -0
  11. package/dist/UIKit/Accordion/AccordionTriggerPrimitive.d.ts +13 -0
  12. package/dist/UIKit/Accordion/AccordionTriggerPrimitive.js +4 -0
  13. package/dist/UIKit/Accordion/BaseAccordion.d.ts +15 -18
  14. package/dist/UIKit/Accordion/BaseAccordionItem.d.ts +12 -21
  15. package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +1 -1
  16. package/dist/UIKit/BaseAutocomplete.d.ts +1 -1
  17. package/dist/UIKit/BaseButton.d.ts +2 -2
  18. package/dist/UIKit/BaseDropDown.d.ts +1 -1
  19. package/dist/UIKit/BaseSnackbar.d.ts +1 -1
  20. package/dist/UIKit/BaseToggle.d.ts +3 -2
  21. package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +1 -1
  22. package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.d.ts +26 -0
  23. package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.js +4 -0
  24. package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.d.ts +21 -0
  25. package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.js +4 -0
  26. package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.d.ts +21 -0
  27. package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.js +4 -0
  28. package/dist/assets/BaseAccordionItem.css +1 -1
  29. package/dist/assets/BaseSnackbar.css +1 -1
  30. package/dist/assets/tailwind.css +1 -1
  31. package/dist/index.d.ts +7 -3
  32. package/dist/index.js +96 -88
  33. package/dist/packages/components/lib/UIKit/Accordion/AccordionContentPrimitive.vue.js +22 -0
  34. package/dist/packages/components/lib/UIKit/Accordion/AccordionHeaderPrimitive.vue.js +21 -0
  35. package/dist/packages/components/lib/UIKit/Accordion/AccordionItemPrimitive.vue.js +24 -0
  36. package/dist/packages/components/lib/UIKit/Accordion/AccordionTriggerPrimitive.vue.js +22 -0
  37. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +22 -14
  38. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +36 -36
  39. package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +17 -17
  40. package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +9 -9
  41. package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +16 -15
  42. package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.vue.js +33 -0
  43. package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxGroupPrimitive.vue.js +35 -0
  44. package/dist/packages/components/lib/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js +31 -0
  45. package/dist/types/index.d.ts +9 -1
  46. package/package.json +1 -1
  47. package/dist/UIKit/Accordion/BaseAccordionBtn.d.ts +0 -34
  48. package/dist/UIKit/Accordion/BaseAccordionBtn.js +0 -4
  49. package/dist/UIKit/Accordion/BaseAccordionContent.d.ts +0 -30
  50. package/dist/UIKit/Accordion/BaseAccordionContent.js +0 -4
  51. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +0 -59
  52. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js +0 -34
  53. /package/dist/assets/{swiper-controller.css → swiper-thumbs.css} +0 -0
@@ -1,7 +1,10 @@
1
- import { defineComponent as n, inject as c, createBlock as u, openBlock as d, unref as t, withCtx as a, createVNode as s, normalizeClass as r, renderSlot as l, createTextVNode as f, toDisplayString as k } from "vue";
2
- import { AccordionItem as h, AccordionHeader as m, AccordionTrigger as g, AccordionContent as w } from "reka-ui";
3
- import { ArrowIcon as C } from "@wikicasa-dev/svg-icons";
4
- const b = /* @__PURE__ */ n({
1
+ import { defineComponent as o, createBlock as l, openBlock as n, withCtx as i, createVNode as a, normalizeClass as s, renderSlot as r, createTextVNode as u, toDisplayString as c, unref as d } from "vue";
2
+ import f from "./AccordionContentPrimitive.vue.js";
3
+ import m from "./AccordionTriggerPrimitive.vue.js";
4
+ import k from "./AccordionHeaderPrimitive.vue.js";
5
+ import h from "./AccordionItemPrimitive.vue.js";
6
+ import { ArrowIcon as w } from "@wikicasa-dev/svg-icons";
7
+ const B = /* @__PURE__ */ o({
5
8
  __name: "BaseAccordionItem",
6
9
  props: {
7
10
  title: {},
@@ -15,39 +18,36 @@ const b = /* @__PURE__ */ n({
15
18
  arrowClasses: {},
16
19
  headerTag: { default: "h3" }
17
20
  },
18
- setup(e) {
19
- const o = c("isActive");
20
- return (i, v) => (d(), u(t(h), { value: e.value }, {
21
- default: a(() => [
22
- s(t(m), {
23
- as: e.headerTag,
24
- class: r([
25
- e.headerClasses,
21
+ setup(t) {
22
+ return (e, g) => (n(), l(h, { value: t.value }, {
23
+ default: i(() => [
24
+ a(k, {
25
+ as: t.headerTag,
26
+ class: s([
27
+ t.headerClasses,
26
28
  "uikit-flex uikit-items-center uikit-justify-between"
27
29
  ])
28
30
  }, {
29
- default: a(() => [
30
- l(i.$slots, "header-content"),
31
- s(t(g), {
32
- "data-cy": e.dataCy,
33
- class: r([
34
- e.triggerClasses,
31
+ default: i(() => [
32
+ r(e.$slots, "header-content"),
33
+ a(m, {
34
+ "data-cy": t.dataCy,
35
+ class: s([
36
+ t.triggerClasses,
35
37
  {
36
- "uikit-inline-flex uikit-cursor-pointer uikit-items-center uikit-justify-between uikit-border-0 uikit-bg-transparent uikit-px-[16px] uikit-py-[16px] uikit-text-left uikit-font-semibold": !i.$slots.trigger,
37
- "uikit-w-full": !i.$slots["header-content"]
38
+ "uikit-base-accordion-trigger uikit-inline-flex uikit-cursor-pointer uikit-items-center uikit-justify-between uikit-border-0 uikit-bg-transparent uikit-px-[16px] uikit-py-[16px] uikit-text-left uikit-font-semibold": !e.$slots.trigger,
39
+ "uikit-w-full": !e.$slots["header-content"]
38
40
  }
39
41
  ])
40
42
  }, {
41
- default: a(() => [
42
- l(i.$slots, "trigger", {
43
- active: t(o)(e.value)
44
- }, () => [
45
- f(k(e.title) + " ", 1),
46
- s(t(C), {
47
- class: r(["uikit-flex-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", [t(o)(e.value) ? "uikit-rotate-180" : "", e.arrowClasses]]),
48
- "arrow-classes": e.arrowClasses,
49
- width: e.arrowWidth,
50
- height: e.arrowWidth
43
+ default: i(() => [
44
+ r(e.$slots, "trigger", {}, () => [
45
+ u(c(t.title) + " ", 1),
46
+ a(d(w), {
47
+ class: s(["uikit-base-accordion-item-arrow uikit-flex-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", t.arrowClasses]),
48
+ "arrow-classes": t.arrowClasses,
49
+ width: t.arrowWidth,
50
+ height: t.arrowWidth
51
51
  }, null, 8, ["class", "arrow-classes", "width", "height"])
52
52
  ])
53
53
  ]),
@@ -56,14 +56,14 @@ const b = /* @__PURE__ */ n({
56
56
  ]),
57
57
  _: 3
58
58
  }, 8, ["as", "class"]),
59
- s(t(w), {
60
- class: r([
61
- e.contentClasses,
59
+ a(f, {
60
+ class: s([
61
+ t.contentClasses,
62
62
  "uikit-base-accordion-item-content uikit-px-[16px]"
63
63
  ])
64
64
  }, {
65
- default: a(() => [
66
- l(i.$slots, "default")
65
+ default: i(() => [
66
+ r(e.$slots, "default")
67
67
  ]),
68
68
  _: 3
69
69
  }, 8, ["class"])
@@ -73,5 +73,5 @@ const b = /* @__PURE__ */ n({
73
73
  }
74
74
  });
75
75
  export {
76
- b as default
76
+ B as default
77
77
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, mergeModels as U, useModel as S, useId as q, useTemplateRef as d, shallowRef as c, onBeforeMount as G, onMounted as J, onUnmounted as Q, watch as E, nextTick as Y, createBlock as z, openBlock as M, withCtx as W, createElementBlock as Z, Fragment as _, renderList as ee, renderSlot as m, createElementVNode as u, normalizeClass as f, withDirectives as I, unref as te, vModelText as le, toDisplayString as ne, withModifiers as oe, normalizeStyle as ae, createTextVNode as ie, vShow as ue } from "vue";
1
+ import { defineComponent as j, mergeModels as U, useModel as S, useId as q, useTemplateRef as d, shallowRef as c, onBeforeMount as G, onMounted as J, onUnmounted as Q, watch as E, nextTick as Y, createBlock as z, openBlock as x, withCtx as M, createElementBlock as Z, Fragment as _, renderList as ee, renderSlot as b, createElementVNode as u, normalizeClass as f, withDirectives as I, unref as te, vModelText as le, toDisplayString as ne, withModifiers as oe, normalizeStyle as ae, createTextVNode as ie, vShow as ue } from "vue";
2
2
  import se from "../BaseDropDown.vue.js";
3
3
  import '../../../../../assets/BaseDropDown.css';/* empty css */
4
4
  import re from "../BaseSelect/SelectItem.vue.js";
@@ -31,14 +31,14 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
31
31
  }),
32
32
  emits: /* @__PURE__ */ U(["input", "click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
33
33
  setup(t, { expose: L, emit: D }) {
34
- const s = S(t, "open"), p = S(t, "modelValue"), o = S(t, "inputValue"), v = D, K = q(), C = d("inputRef"), k = c(0), y = c(!1), r = c(!1), x = c(null), a = c([]), O = d("dropdownRef"), h = d("hiddenSpan"), w = d("inputWrapperRef"), R = d("clearButtonRef"), N = () => {
34
+ const s = S(t, "open"), p = S(t, "modelValue"), o = S(t, "inputValue"), v = D, K = q(), C = d("inputRef"), k = c(0), y = c(!1), r = c(!1), W = c(null), a = c([]), O = d("dropdownRef"), h = d("hiddenSpan"), w = d("inputWrapperRef"), R = d("clearButtonRef"), N = () => {
35
35
  o.value = "", p.value = null, r.value = !1;
36
36
  }, A = async (l) => {
37
37
  if (!l) {
38
38
  a.value = [], s.value = !1;
39
39
  return;
40
40
  }
41
- t.disableCb || (a.value = await x.value?.(l) || [], y.value = !0, s.value = !!a.value.length);
41
+ t.disableCb || (a.value = await W.value?.(l) || [], y.value = !0, s.value = !!a.value.length);
42
42
  }, F = (l = -1) => {
43
43
  const e = a.value[l];
44
44
  !e || e.id === p.value?.id || (t.onOptionSelectedCb?.(e), o.value = e.label, s.value = !1, p.value = e, r.value = !0, a.value = []);
@@ -51,11 +51,11 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
51
51
  const $ = () => {
52
52
  const l = h.value, e = w.value, n = R.value;
53
53
  if (!l || !e) return;
54
- const T = l.offsetWidth, b = e.offsetWidth, i = t.clearButton?.offset || 0, g = t.clearButton?.width || n?.offsetWidth || 0, X = b - i - g, V = Math.min(T, X);
54
+ const T = l.offsetWidth, m = e.offsetWidth, i = t.clearButton?.offset || 0, g = t.clearButton?.width || n?.offsetWidth || 0, X = m - i - g, V = Math.min(T, X);
55
55
  V !== k.value && (k.value = V);
56
56
  };
57
57
  return G(() => {
58
- x.value = de({ delay: 300 }, t.onInputChangeCb);
58
+ W.value = de({ delay: 300 }, t.onInputChangeCb);
59
59
  }), J(() => {
60
60
  w.value && (B = new ResizeObserver(() => {
61
61
  $();
@@ -82,7 +82,7 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
82
82
  getRootElement: () => O.value?.getRootElement(),
83
83
  select: P,
84
84
  focus: H
85
- }), (l, e) => (M(), z(se, {
85
+ }), (l, e) => (x(), z(se, {
86
86
  ref: "dropdownRef",
87
87
  class: "uikit-clearable-autocomplete",
88
88
  "data-cy": t.dataCy,
@@ -95,12 +95,12 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
95
95
  open: s.value,
96
96
  "onUpdate:open": e[6] || (e[6] = (n) => s.value = n)
97
97
  }, {
98
- btn_slot: W(() => [
98
+ btn_slot: M(() => [
99
99
  u("div", {
100
100
  class: f(["uikit-text-16", t.triggerWrapperClasses]),
101
101
  onClick: e[4] || (e[4] = (n) => v("click", n))
102
102
  }, [
103
- m(l.$slots, "left-icon"),
103
+ b(l.$slots, "left-icon"),
104
104
  u("div", {
105
105
  ref: "inputWrapperRef",
106
106
  class: f(["uikit-relative", t.inputWrapperClasses])
@@ -134,7 +134,7 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
134
134
  u("span", {
135
135
  ref_key: "hiddenSpan",
136
136
  ref: h,
137
- class: f(["uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre", t.hiddenTextClasses]),
137
+ class: f(["uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-max-w-full uikit-overflow-hidden uikit-whitespace-pre", t.hiddenTextClasses]),
138
138
  style: {
139
139
  font: "inherit",
140
140
  fontSize: "inherit"
@@ -152,31 +152,31 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
152
152
  }),
153
153
  onClick: oe(N, ["stop"])
154
154
  }, [
155
- m(l.$slots, "clear-icon", {}, () => [
155
+ b(l.$slots, "clear-icon", {}, () => [
156
156
  e[7] || (e[7] = ie("X", -1))
157
157
  ])
158
158
  ], 6), [
159
159
  [ue, r.value && k.value]
160
160
  ])
161
161
  ], 2),
162
- m(l.$slots, "right-icon")
162
+ b(l.$slots, "right-icon")
163
163
  ], 2)
164
164
  ]),
165
- default: W(({ activeIdx: n, setActiveIdx: T }) => [
166
- (M(!0), Z(_, null, ee(a.value, (b, i) => (M(), z(re, {
165
+ default: M(({ activeIdx: n, setActiveIdx: T }) => [
166
+ (x(!0), Z(_, null, ee(a.value, (m, i) => (x(), z(re, {
167
167
  key: i,
168
168
  active: n === i,
169
169
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
170
170
  onClick: (g) => F(i),
171
171
  onMouseover: (g) => T(i)
172
172
  }, {
173
- default: W(() => [
174
- m(l.$slots, "option-content", {
175
- option: b,
173
+ default: M(() => [
174
+ b(l.$slots, "option-content", {
175
+ option: m,
176
176
  idx: i
177
177
  }, () => [
178
178
  u("span", {
179
- innerHTML: b.label
179
+ innerHTML: m.label
180
180
  }, null, 8, fe)
181
181
  ])
182
182
  ]),
@@ -1,13 +1,13 @@
1
- import { defineComponent as x, mergeModels as I, useModel as w, ref as b, watch as y, nextTick as $, createBlock as s, openBlock as r, unref as i, withCtx as a, renderSlot as f, createVNode as n, normalizeClass as m, createCommentVNode as p, normalizeStyle as B } from "vue";
1
+ import { defineComponent as x, mergeModels as b, useModel as w, ref as I, watch as y, nextTick as $, createBlock as s, openBlock as r, unref as i, withCtx as a, renderSlot as f, createVNode as n, normalizeClass as m, createCommentVNode as p, normalizeStyle as B } from "vue";
2
2
  import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
3
3
  import { ToastProvider as D, ToastRoot as M, ToastTitle as P, ToastDescription as z, ToastClose as S, ToastAction as A, ProgressRoot as N, ProgressIndicator as R, ToastPortal as U, ToastViewport as h } from "reka-ui";
4
4
  const q = /* @__PURE__ */ x({
5
5
  inheritAttrs: !1,
6
6
  __name: "BaseSnackbar",
7
- props: /* @__PURE__ */ I({
7
+ props: /* @__PURE__ */ b({
8
8
  alertClass: { default: "primary" },
9
9
  duration: { default: 3e3 },
10
- swipeDirection: { default: "right" },
10
+ swipeDirection: { default: "left" },
11
11
  to: { type: [String, Boolean], default: "body" },
12
12
  dataCy: { default: "" },
13
13
  withCloseIcon: { type: Boolean, default: !0 },
@@ -21,26 +21,26 @@ const q = /* @__PURE__ */ x({
21
21
  }),
22
22
  emits: ["update:open", "update:refresh"],
23
23
  setup(t) {
24
- const l = w(t, "open"), v = w(t, "refresh"), o = b(0);
24
+ const l = w(t, "open"), v = w(t, "refresh"), o = I(0);
25
25
  let k, c;
26
- const g = (e = 3e3) => {
26
+ const T = (e = 3e3) => {
27
27
  o.value = 0;
28
28
  const u = Date.now();
29
29
  c = setInterval(() => {
30
30
  const C = Date.now() - u;
31
31
  o.value = Math.min(100, C / e * 100), o.value >= 100 && clearInterval(c);
32
32
  }, 30);
33
- }, T = () => {
33
+ }, g = () => {
34
34
  clearTimeout(k), k = setTimeout(() => {
35
35
  l.value = !1;
36
- }, t.duration), g(t.duration);
36
+ }, t.duration), T(t.duration);
37
37
  };
38
38
  return y(
39
39
  l,
40
40
  (e) => {
41
41
  $(() => {
42
42
  if (e) {
43
- T();
43
+ g();
44
44
  return;
45
45
  }
46
46
  clearInterval(c), clearTimeout(k), o.value = 0;
@@ -60,7 +60,7 @@ const q = /* @__PURE__ */ x({
60
60
  open: l.value,
61
61
  "onUpdate:open": u[1] || (u[1] = (d) => l.value = d),
62
62
  duration: t.duration,
63
- class: m(["uikit-toast-root uikit-relative uikit-flex uikit-gap-[8px] uikit-overflow-hidden uikit-rounded-[4px] uikit-p-[16px] uikit-text-16 uikit-font-medium uikit-shadow-surface sm:uikit-max-w-[460px]", ["uikit-alert", `uikit-alert-w-${t.alertClass}`, e.$attrs.class]]),
63
+ class: m(["uikit-toast-root uikit-relative uikit-box-border uikit-flex uikit-gap-[8px] uikit-overflow-hidden uikit-rounded-[4px] uikit-p-[16px] uikit-text-16 uikit-font-medium uikit-shadow-surface sm:uikit-max-w-[460px]", ["uikit-alert", `uikit-alert-w-${t.alertClass}`, e.$attrs.class]]),
64
64
  "data-cy": t.dataCy,
65
65
  type: t.type
66
66
  }, {
@@ -1,38 +1,39 @@
1
- import { defineComponent as s, mergeModels as n, useModel as d, createElementBlock as k, openBlock as c, renderSlot as u, createVNode as a, createCommentVNode as m, unref as o, withCtx as f, createElementVNode as p } from "vue";
1
+ import { defineComponent as d, mergeModels as s, useModel as n, createElementBlock as k, openBlock as c, renderSlot as a, createVNode as u, createCommentVNode as m, unref as o, withCtx as f, createElementVNode as p } from "vue";
2
2
  import { SwitchRoot as b, SwitchThumb as h } from "reka-ui";
3
- const g = { class: "uikit-flex uikit-items-center uikit-gap-[8px]" }, w = ["innerHTML"], y = /* @__PURE__ */ s({
4
- inheritAttrs: !1,
3
+ const g = { class: "uikit-flex uikit-items-center uikit-gap-[8px]" }, w = ["innerHTML"], V = /* @__PURE__ */ d({
5
4
  __name: "BaseToggle",
6
- props: /* @__PURE__ */ n({
7
- label: {}
5
+ props: /* @__PURE__ */ s({
6
+ label: {},
7
+ dataCy: {}
8
8
  }, {
9
9
  modelValue: { type: Boolean, default: !1 },
10
10
  modelModifiers: {}
11
11
  }),
12
12
  emits: ["update:modelValue"],
13
- setup(t) {
14
- const i = d(t, "modelValue");
15
- return (e, l) => (c(), k("div", g, [
16
- u(e.$slots, "leftLabel"),
17
- a(o(b), {
13
+ setup(e) {
14
+ const i = n(e, "modelValue");
15
+ return (t, l) => (c(), k("div", g, [
16
+ a(t.$slots, "leftLabel"),
17
+ u(o(b), {
18
18
  modelValue: i.value,
19
19
  "onUpdate:modelValue": l[0] || (l[0] = (r) => i.value = r),
20
+ "data-cy": e.dataCy,
20
21
  class: "uikit-flex uikit-h-[20px] uikit-w-[40px] uikit-cursor-pointer uikit-rounded-full uikit-p-0 uikit-transition-[background] uikit-will-change-[background] focus-visible:uikit-outline-w-primary data-[state=checked]:uikit-bg-w-primary data-[state=unchecked]:uikit-bg-w-cultured"
21
22
  }, {
22
23
  default: f(() => [
23
- a(o(h), { class: "uikit-box-border uikit-flex uikit-size-[20px] uikit-translate-x-0 uikit-items-center uikit-justify-center uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-shadow-xl uikit-transition-transform uikit-will-change-transform data-[state=checked]:uikit-translate-x-full" })
24
+ u(o(h), { class: "uikit-box-border uikit-flex uikit-size-[20px] uikit-translate-x-0 uikit-items-center uikit-justify-center uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-shadow-xl uikit-transition-transform uikit-will-change-transform data-[state=checked]:uikit-translate-x-full" })
24
25
  ]),
25
26
  _: 1
26
- }, 8, ["modelValue"]),
27
- e.$slots.leftLabel ? m("", !0) : u(e.$slots, "rightLabel", { key: 0 }, () => [
27
+ }, 8, ["modelValue", "data-cy"]),
28
+ t.$slots.leftLabel ? m("", !0) : a(t.$slots, "rightLabel", { key: 0 }, () => [
28
29
  p("span", {
29
30
  class: "uikit-ml-[10px]",
30
- innerHTML: t.label
31
+ innerHTML: e.label
31
32
  }, null, 8, w)
32
33
  ])
33
34
  ]));
34
35
  }
35
36
  });
36
37
  export {
37
- y as default
38
+ V as default
38
39
  };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as n, createPropsRestProxy as p, createBlock as u, openBlock as i, unref as m, mergeProps as s, withCtx as c, renderSlot as y, normalizeProps as f, guardReactiveProps as C } from "vue";
2
+ import { CheckboxRoot as B } from "reka-ui";
3
+ const V = /* @__PURE__ */ n({
4
+ __name: "CheckboxGroupItemPrimitive",
5
+ props: {
6
+ dataCy: {},
7
+ value: {},
8
+ defaultValue: { type: [Boolean, String] },
9
+ modelValue: { type: [Boolean, String, null] },
10
+ disabled: { type: Boolean },
11
+ id: {},
12
+ asChild: { type: Boolean },
13
+ as: {},
14
+ name: {},
15
+ required: { type: Boolean }
16
+ },
17
+ emits: ["update:modelValue"],
18
+ setup(t, { emit: a }) {
19
+ const r = p(t, ["dataCy"]), l = a;
20
+ return (d, o) => (i(), u(m(B), s(r, {
21
+ "data-cy": t.dataCy,
22
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => l("update:modelValue", e))
23
+ }), {
24
+ default: c((e) => [
25
+ y(d.$slots, "default", f(C(e)))
26
+ ]),
27
+ _: 3
28
+ }, 16, ["data-cy"]));
29
+ }
30
+ });
31
+ export {
32
+ V as default
33
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as n, createPropsRestProxy as p, createBlock as u, openBlock as i, unref as s, mergeProps as m, withCtx as c, renderSlot as y } from "vue";
2
+ import { CheckboxGroupRoot as f } from "reka-ui";
3
+ const x = /* @__PURE__ */ n({
4
+ __name: "CheckboxGroupPrimitive",
5
+ props: {
6
+ dataCy: {},
7
+ defaultValue: {},
8
+ modelValue: {},
9
+ rovingFocus: { type: Boolean },
10
+ disabled: { type: Boolean },
11
+ as: {},
12
+ asChild: { type: Boolean },
13
+ dir: {},
14
+ orientation: {},
15
+ loop: { type: Boolean },
16
+ name: {},
17
+ required: { type: Boolean }
18
+ },
19
+ emits: ["update:modelValue"],
20
+ setup(e, { emit: t }) {
21
+ const a = p(e, ["dataCy"]), r = t;
22
+ return (l, o) => (i(), u(s(f), m(a, {
23
+ "data-cy": e.dataCy,
24
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => r("update:modelValue", d))
25
+ }), {
26
+ default: c(() => [
27
+ y(l.$slots, "default")
28
+ ]),
29
+ _: 3
30
+ }, 16, ["data-cy"]));
31
+ }
32
+ });
33
+ export {
34
+ x as default
35
+ };
@@ -0,0 +1,31 @@
1
+ import { defineComponent as n, createPropsRestProxy as d, createBlock as l, openBlock as p, unref as m, mergeProps as c, withCtx as u, renderSlot as y, normalizeProps as f, guardReactiveProps as C } from "vue";
2
+ import { RadioGroupItem as P } from "reka-ui";
3
+ const v = /* @__PURE__ */ n({
4
+ __name: "RadioGroupItemPrimitive",
5
+ props: {
6
+ dataCy: {},
7
+ id: {},
8
+ value: {},
9
+ disabled: { type: Boolean },
10
+ asChild: { type: Boolean },
11
+ as: {},
12
+ name: {},
13
+ required: { type: Boolean }
14
+ },
15
+ emits: ["select"],
16
+ setup(t, { emit: a }) {
17
+ const r = d(t, ["dataCy"]), s = a;
18
+ return (i, o) => (p(), l(m(P), c(r, {
19
+ "data-cy": t.dataCy,
20
+ onSelect: o[0] || (o[0] = (e) => s("select", e))
21
+ }), {
22
+ default: u((e) => [
23
+ y(i.$slots, "default", f(C(e)))
24
+ ]),
25
+ _: 3
26
+ }, 16, ["data-cy"]));
27
+ }
28
+ });
29
+ export {
30
+ v as default
31
+ };
@@ -1,5 +1,4 @@
1
1
  export * from '../UIKit/types';
2
- export type { AccordionItemDecorated, AccordionItem, } from '../UIKit/Accordion/BaseAccordion';
3
2
  export type { CheckboxGroupProps, CheckboxButtonType, } from '../UIKit/Checkbox/CheckboxGroup';
4
3
  export type { BaseTabProps } from '../UIKit/Tab/BaseTabView';
5
4
  export type { RadioButtonType } from '../UIKit/Radio/RadioGroup';
@@ -10,4 +9,13 @@ export type { ChartOptions, ChartData } from 'chart.js';
10
9
  export type { BaseAutocompleteThemes } from '../UIKit/BaseAutocomplete';
11
10
  export type { RadioButtonGroupProps } from '../UIKit/Radio/v2/RadioButtonGroup';
12
11
  export type { RadioButtonItemProps } from '../UIKit/Radio/v2/RadioButtonItem';
12
+ export type { RadioGroupItemPrimitiveProps } from '../UIKit/Radio/v2/RadioGroupItemPrimitive';
13
13
  export type { CheckboxButtonGroupProps, CheckboxButtonItem, } from '../UIKit/Checkbox/v2/CheckboxButtonGroup';
14
+ export type { CheckboxGroupPrimitiveProps } from '../UIKit/Checkbox/v2/CheckboxGroupPrimitive';
15
+ export type { CheckboxGroupItemPrimitiveProps } from '../UIKit/Checkbox/v2/CheckboxGroupItemPrimitive';
16
+ export type { BaseAccordionProps } from '../UIKit/Accordion/BaseAccordion';
17
+ export type { BaseAccordionItemProps } from '../UIKit/Accordion/BaseAccordionItem';
18
+ export type { AccordionContentPrimitiveProps } from '../UIKit/Accordion/AccordionContentPrimitive';
19
+ export type { AccordionHeaderPrimitiveProps } from '../UIKit/Accordion/AccordionHeaderPrimitive';
20
+ export type { AccordionItemPrimitiveProps } from '../UIKit/Accordion/AccordionItemPrimitive';
21
+ export type { AccordionTriggerPrimitiveProps } from '../UIKit/Accordion/AccordionTriggerPrimitive';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.3.1-alpha.1",
3
+ "version": "2.3.1-alpha.11",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,34 +0,0 @@
1
- type __VLS_Props = {
2
- id: string | number;
3
- arrowWidth?: number;
4
- arrowColor?: `#${string}`;
5
- onContainerClickExpand?: boolean;
6
- accordionOpen?: boolean;
7
- toggleAccordion: () => void;
8
- };
9
- declare function __VLS_template(): {
10
- attrs: Partial<{}>;
11
- slots: {
12
- 'custom-content'?(_: {}): any;
13
- custom_btn?(_: {
14
- btnId: string;
15
- isOpen: boolean;
16
- toggleAccordion: () => void;
17
- }): any;
18
- };
19
- refs: {};
20
- rootEl: any;
21
- };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
- click: () => any;
25
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
26
- onClick?: (() => any) | undefined;
27
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
- export default _default;
30
- type __VLS_WithTemplateSlots<T, S> = T & {
31
- new (): {
32
- $slots: S;
33
- };
34
- };
@@ -1,4 +0,0 @@
1
- import f from "../../packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,30 +0,0 @@
1
- import { ClassTypeProp } from '../types';
2
- type __VLS_Props = {
3
- id: string | number;
4
- accordionOpen: boolean;
5
- accordionOpenClasses?: ClassTypeProp;
6
- accordionClosedClasses?: ClassTypeProp;
7
- accordionContentClasses?: ClassTypeProp;
8
- };
9
- declare function __VLS_template(): {
10
- attrs: Partial<{}>;
11
- slots: {
12
- 'custom-accordion-content'?(_: {
13
- isOpen: boolean;
14
- }): any;
15
- default?(_: {
16
- isOpen: boolean;
17
- }): any;
18
- };
19
- refs: {};
20
- rootEl: HTMLDivElement;
21
- };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
24
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
- export default _default;
26
- type __VLS_WithTemplateSlots<T, S> = T & {
27
- new (): {
28
- $slots: S;
29
- };
30
- };
@@ -1,4 +0,0 @@
1
- import f from "../../packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,59 +0,0 @@
1
- import { defineComponent as l, createElementBlock as s, openBlock as d, normalizeClass as n, renderSlot as i, createElementVNode as u, withModifiers as k, createVNode as m, unref as f } from "vue";
2
- import { ArrowIcon as g } from "@wikicasa-dev/svg-icons";
3
- const C = ["id"], w = ["aria-expanded", "aria-controls"], b = /* @__PURE__ */ l({
4
- inheritAttrs: !1,
5
- __name: "BaseAccordionBtn",
6
- props: {
7
- id: {},
8
- arrowWidth: { default: 12 },
9
- arrowColor: {},
10
- onContainerClickExpand: { type: Boolean, default: !1 },
11
- accordionOpen: { type: Boolean, default: !1 },
12
- toggleAccordion: { type: Function }
13
- },
14
- emits: ["click"],
15
- setup(t, { emit: r }) {
16
- const a = r;
17
- return (o, e) => (d(), s("div", {
18
- id: `${t.id}`,
19
- class: n(["uikit-flex uikit-items-center uikit-justify-around", [
20
- o.$attrs["btn-wrapper-classes"],
21
- t.onContainerClickExpand ? "uikit-cursor-pointer" : ""
22
- ]]),
23
- onClick: e[1] || (e[1] = (c) => t.onContainerClickExpand && t.toggleAccordion())
24
- }, [
25
- i(o.$slots, "custom-content"),
26
- i(o.$slots, "custom_btn", {
27
- btnId: `btn-${t.id}`,
28
- isOpen: t.accordionOpen,
29
- toggleAccordion: t.toggleAccordion
30
- }, () => [
31
- u("button", {
32
- type: "button",
33
- class: n(["uikit-border-0 uikit-bg-transparent", o.$attrs["btn-classes"]]),
34
- "aria-expanded": t.accordionOpen,
35
- "aria-controls": `accordion-text-${t.id}`,
36
- onClick: e[0] || (e[0] = k((c) => {
37
- t.toggleAccordion(), a("click");
38
- }, ["prevent", "stop"]))
39
- }, [
40
- m(f(g), {
41
- class: n([
42
- "uikit-transition-transform motion-reduce:uikit-transition-none",
43
- [
44
- t.accordionOpen ? "uikit-rotate-180" : "",
45
- o.$attrs["arrow-classes"]
46
- ]
47
- ]),
48
- "stroke-color": t.arrowColor ?? "#222",
49
- width: t.arrowWidth,
50
- height: t.arrowWidth
51
- }, null, 8, ["stroke-color", "class", "width", "height"])
52
- ], 10, w)
53
- ])
54
- ], 10, C));
55
- }
56
- });
57
- export {
58
- b as default
59
- };
@@ -1,34 +0,0 @@
1
- import { defineComponent as n, createElementBlock as a, openBlock as c, normalizeClass as o, renderSlot as t, createElementVNode as d } from "vue";
2
- const s = ["id", "aria-labelledby"], u = /* @__PURE__ */ n({
3
- __name: "BaseAccordionContent",
4
- props: {
5
- id: {},
6
- accordionOpen: { type: Boolean },
7
- accordionOpenClasses: {},
8
- accordionClosedClasses: {},
9
- accordionContentClasses: {}
10
- },
11
- setup(i) {
12
- return (e, r) => (c(), a("div", {
13
- id: `accordion-text-${i.id}`,
14
- role: "region",
15
- "aria-labelledby": `accordion-title-${i.id}`,
16
- class: o(["uikit-grid uikit-overflow-hidden uikit-px-5 uikit-text-sm uikit-text-w-black uikit-transition-[grid-template-rows,opacity,padding,margin] uikit-duration-300 uikit-ease-in-out", [
17
- i.accordionOpen ? i.accordionOpenClasses : i.accordionClosedClasses,
18
- i.accordionOpen ? "uikit-grid-rows-[1fr] uikit-opacity-100" : "uikit-grid-rows-[0fr] uikit-opacity-0",
19
- e.$attrs["accordion-classes"]
20
- ]])
21
- }, [
22
- t(e.$slots, "custom-accordion-content", { isOpen: i.accordionOpen }, () => [
23
- d("div", {
24
- class: o(["uikit-overflow-hidden", i.accordionContentClasses])
25
- }, [
26
- t(e.$slots, "default", { isOpen: i.accordionOpen })
27
- ], 2)
28
- ])
29
- ], 10, s));
30
- }
31
- });
32
- export {
33
- u as default
34
- };