@wikicasa-dev/components 2.3.1-alpha.2 → 2.3.1-alpha.21

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 (75) 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 +3 -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 +11 -3
  27. package/dist/UIKit/Tab/v2/BaseTabs.d.ts +24 -0
  28. package/dist/UIKit/Tab/v2/BaseTabs.js +5 -0
  29. package/dist/UIKit/Tab/v2/BaseTabsContent.d.ts +13 -0
  30. package/dist/UIKit/Tab/v2/BaseTabsContent.js +4 -0
  31. package/dist/UIKit/Tab/v2/BaseTabsIndicator.d.ts +66 -0
  32. package/dist/UIKit/Tab/v2/BaseTabsIndicator.js +5 -0
  33. package/dist/UIKit/Tab/v2/BaseTabsList.d.ts +13 -0
  34. package/dist/UIKit/Tab/v2/BaseTabsList.js +4 -0
  35. package/dist/UIKit/Tab/v2/BaseTabsTrigger.d.ts +20 -0
  36. package/dist/UIKit/Tab/v2/BaseTabsTrigger.js +4 -0
  37. package/dist/assets/BaseAccordionItem.css +1 -1
  38. package/dist/assets/BaseBadge.css +1 -1
  39. package/dist/assets/BaseCard.css +1 -1
  40. package/dist/assets/BaseComplexToggle.css +1 -1
  41. package/dist/assets/BaseModal.css +1 -1
  42. package/dist/assets/BaseSnackbar.css +1 -1
  43. package/dist/assets/BaseTabs.css +1 -0
  44. package/dist/assets/BaseTabsIndicator.css +1 -0
  45. package/dist/assets/tailwind.css +1 -1
  46. package/dist/index.d.ts +11 -2
  47. package/dist/index.js +111 -91
  48. package/dist/packages/components/lib/UIKit/Accordion/AccordionContentPrimitive.vue.js +22 -0
  49. package/dist/packages/components/lib/UIKit/Accordion/AccordionHeaderPrimitive.vue.js +21 -0
  50. package/dist/packages/components/lib/UIKit/Accordion/AccordionItemPrimitive.vue.js +24 -0
  51. package/dist/packages/components/lib/UIKit/Accordion/AccordionTriggerPrimitive.vue.js +22 -0
  52. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +22 -14
  53. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +36 -36
  54. package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +17 -17
  55. package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +1 -3
  56. package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +54 -52
  57. package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +16 -15
  58. package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.vue.js +33 -0
  59. package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxGroupPrimitive.vue.js +35 -0
  60. package/dist/packages/components/lib/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js +14 -10
  61. package/dist/packages/components/lib/UIKit/Tab/BaseTabView.vue.js +45 -46
  62. package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabs.vue.js +39 -0
  63. package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsContent.vue.js +24 -0
  64. package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsIndicator.vue.js +34 -0
  65. package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsList.vue.js +23 -0
  66. package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsTrigger.vue.js +31 -0
  67. package/dist/types/index.d.ts +13 -1
  68. package/package.json +15 -15
  69. package/dist/UIKit/Accordion/BaseAccordionBtn.d.ts +0 -34
  70. package/dist/UIKit/Accordion/BaseAccordionBtn.js +0 -4
  71. package/dist/UIKit/Accordion/BaseAccordionContent.d.ts +0 -30
  72. package/dist/UIKit/Accordion/BaseAccordionContent.js +0 -4
  73. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +0 -59
  74. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js +0 -34
  75. /package/dist/assets/{swiper-controller.css → swiper-thumbs.css} +0 -0
@@ -0,0 +1,24 @@
1
+ import { defineComponent as i, createBlock as p, openBlock as l, unref as s, normalizeProps as e, guardReactiveProps as o, withCtx as c, renderSlot as d } from "vue";
2
+ import { AccordionItem as m } from "reka-ui";
3
+ const B = /* @__PURE__ */ i({
4
+ __name: "AccordionItemPrimitive",
5
+ props: {
6
+ disabled: { type: Boolean },
7
+ value: {},
8
+ unmountOnHide: { type: Boolean },
9
+ asChild: { type: Boolean },
10
+ as: {}
11
+ },
12
+ setup(t) {
13
+ const r = t;
14
+ return (n, u) => (l(), p(s(m), e(o(r)), {
15
+ default: c((a) => [
16
+ d(n.$slots, "default", e(o(a)))
17
+ ]),
18
+ _: 3
19
+ }, 16));
20
+ }
21
+ });
22
+ export {
23
+ B as default
24
+ };
@@ -0,0 +1,22 @@
1
+ import { defineComponent as o, createPropsRestProxy as a, createBlock as c, openBlock as n, unref as d, mergeProps as i, withCtx as s, renderSlot as p } from "vue";
2
+ import { AccordionTrigger as l } from "reka-ui";
3
+ const y = /* @__PURE__ */ o({
4
+ __name: "AccordionTriggerPrimitive",
5
+ props: {
6
+ asChild: { type: Boolean },
7
+ as: {},
8
+ dataCy: {}
9
+ },
10
+ setup(e) {
11
+ const r = a(e, ["dataCy"]);
12
+ return (t, m) => (n(), c(d(l), i(r, { "data-cy": e.dataCy }), {
13
+ default: s(() => [
14
+ p(t.$slots, "default")
15
+ ]),
16
+ _: 3
17
+ }, 16, ["data-cy"]));
18
+ }
19
+ });
20
+ export {
21
+ y as default
22
+ };
@@ -1,25 +1,33 @@
1
- import { defineComponent as i, mergeModels as d, useModel as r, provide as u, createBlock as n, openBlock as s, unref as p, withCtx as m, renderSlot as c } from "vue";
2
- import { AccordionRoot as f } from "reka-ui";
3
- const b = /* @__PURE__ */ i({
1
+ import { defineComponent as d, mergeModels as n, useModel as u, createBlock as i, openBlock as r, unref as m, withCtx as p, renderSlot as s, normalizeProps as c, guardReactiveProps as f } from "vue";
2
+ import { AccordionRoot as y } from "reka-ui";
3
+ const b = /* @__PURE__ */ d({
4
4
  __name: "BaseAccordion",
5
- props: /* @__PURE__ */ d({
5
+ props: /* @__PURE__ */ n({
6
6
  collapsible: { type: Boolean },
7
- type: {}
7
+ type: {},
8
+ disabled: { type: Boolean },
9
+ dir: {},
10
+ orientation: {},
11
+ unmountOnHide: { type: Boolean },
12
+ asChild: { type: Boolean },
13
+ as: {},
14
+ modelValue: {},
15
+ defaultValue: {}
8
16
  }, {
9
17
  modelValue: {},
10
18
  modelModifiers: {}
11
19
  }),
12
20
  emits: ["update:modelValue"],
13
- setup(t) {
14
- const e = r(t, "modelValue");
15
- return u("isActive", (l) => typeof e.value == "string" ? e.value === l : !!e.value?.find((o) => o === l)), (l, o) => (s(), n(p(f), {
16
- collapsible: t.collapsible,
17
- type: t.type,
18
- modelValue: e.value,
19
- "onUpdate:modelValue": o[0] || (o[0] = (a) => e.value = a)
21
+ setup(e) {
22
+ const l = u(e, "modelValue");
23
+ return (t, a) => (r(), i(m(y), {
24
+ collapsible: e.collapsible,
25
+ type: e.type,
26
+ modelValue: l.value,
27
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => l.value = o)
20
28
  }, {
21
- default: m(() => [
22
- c(l.$slots, "default")
29
+ default: p((o) => [
30
+ s(t.$slots, "default", c(f(o)))
23
31
  ]),
24
32
  _: 3
25
33
  }, 8, ["collapsible", "type", "modelValue"]));
@@ -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
  ]),
@@ -132,9 +132,7 @@ const J = { class: "range_container" }, K = { class: "sliders_control" }, O = ["
132
132
  l
133
133
  ), h(parseInt(l.value, 10), l), a <= t ? (d.value = t, o.value = v) : (l.value = `${a}`, d.value = a, o.value = a);
134
134
  }, b = j();
135
- return (() => {
136
- n.value = parseInt(`${m.min || 0}`, 10), u.value = parseInt(`${m.max || 100}`, 10), c.value = n.value, d.value = u.value, r.value = parseInt(`${b.minValue || n.value}`, 10), o.value = parseInt(`${b.maxValue || u.value}`, 10), F.value = Math.log(r.value || 1), M.value = Math.log(o.value), y.value = (M.value - F.value) / (u.value - n.value);
137
- })(), q(() => {
135
+ return n.value = parseInt(`${m.min || 0}`, 10), u.value = parseInt(`${m.max || 100}`, 10), c.value = n.value, d.value = u.value, r.value = parseInt(`${b.minValue || n.value}`, 10), o.value = parseInt(`${b.maxValue || u.value}`, 10), F.value = Math.log(r.value || 1), M.value = Math.log(o.value), y.value = (M.value - F.value) / (u.value - n.value), q(() => {
138
136
  !g.value || !i.value || (V(
139
137
  c.value,
140
138
  {
@@ -1,16 +1,17 @@
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 b, mergeModels as I, useModel as w, ref as $, watch as y, nextTick as x, createBlock as u, openBlock as r, unref as i, withCtx as a, renderSlot as d, createVNode as n, normalizeClass as k, 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
- const q = /* @__PURE__ */ x({
4
+ const q = /* @__PURE__ */ b({
5
5
  inheritAttrs: !1,
6
6
  __name: "BaseSnackbar",
7
7
  props: /* @__PURE__ */ I({
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 },
14
+ closeClasses: {},
14
15
  viewportClasses: { default: "" },
15
16
  type: { default: "foreground" }
16
17
  }, {
@@ -20,94 +21,95 @@ const q = /* @__PURE__ */ x({
20
21
  refreshModifiers: {}
21
22
  }),
22
23
  emits: ["update:open", "update:refresh"],
23
- setup(t) {
24
- const l = w(t, "open"), v = w(t, "refresh"), o = b(0);
25
- let k, c;
26
- const g = (e = 3e3) => {
24
+ setup(e) {
25
+ const l = w(e, "open"), v = w(e, "refresh"), o = $(0);
26
+ let c, m;
27
+ const C = (t = 3e3) => {
27
28
  o.value = 0;
28
- const u = Date.now();
29
- c = setInterval(() => {
30
- const C = Date.now() - u;
31
- o.value = Math.min(100, C / e * 100), o.value >= 100 && clearInterval(c);
29
+ const s = Date.now();
30
+ m = setInterval(() => {
31
+ const g = Date.now() - s;
32
+ o.value = Math.min(100, g / t * 100), o.value >= 100 && clearInterval(m);
32
33
  }, 30);
33
34
  }, T = () => {
34
- clearTimeout(k), k = setTimeout(() => {
35
+ clearTimeout(c), c = setTimeout(() => {
35
36
  l.value = !1;
36
- }, t.duration), g(t.duration);
37
+ }, e.duration), C(e.duration);
37
38
  };
38
39
  return y(
39
40
  l,
40
- (e) => {
41
- $(() => {
42
- if (e) {
41
+ (t) => {
42
+ x(() => {
43
+ if (t) {
43
44
  T();
44
45
  return;
45
46
  }
46
- clearInterval(c), clearTimeout(k), o.value = 0;
47
+ clearInterval(m), clearTimeout(c), o.value = 0;
47
48
  });
48
49
  },
49
50
  { immediate: !0 }
50
- ), y(v, (e) => {
51
- e && (l.value = !1, setTimeout(() => {
51
+ ), y(v, (t) => {
52
+ t && (l.value = !1, setTimeout(() => {
52
53
  l.value = !0, v.value = !1;
53
54
  }));
54
- }), (e, u) => (r(), s(i(D), { "swipe-direction": t.swipeDirection }, {
55
+ }), (t, s) => (r(), u(i(D), { "swipe-direction": e.swipeDirection }, {
55
56
  default: a(() => [
56
- f(e.$slots, "trigger", {
57
+ d(t.$slots, "trigger", {
57
58
  open: () => l.value = !0
58
59
  }),
59
60
  n(i(M), {
60
61
  open: l.value,
61
- "onUpdate:open": u[1] || (u[1] = (d) => l.value = d),
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]]),
64
- "data-cy": t.dataCy,
65
- type: t.type
62
+ "onUpdate:open": s[1] || (s[1] = (f) => l.value = f),
63
+ duration: e.duration,
64
+ class: k(["uikit-toast-root uikit-relative uikit-box-border 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-${e.alertClass}`, t.$attrs.class]]),
65
+ "data-cy": e.dataCy,
66
+ type: e.type
66
67
  }, {
67
68
  default: a(() => [
68
- e.$slots.title ? (r(), s(i(P), {
69
+ t.$slots.title ? (r(), u(i(P), {
69
70
  key: 0,
70
71
  "as-child": ""
71
72
  }, {
72
73
  default: a(() => [
73
- f(e.$slots, "title")
74
+ d(t.$slots, "title")
74
75
  ]),
75
76
  _: 3
76
77
  })) : p("", !0),
77
78
  n(i(z), { "as-child": "" }, {
78
79
  default: a(() => [
79
- f(e.$slots, "default"),
80
- t.withCloseIcon ? (r(), s(i(S), {
81
- key: 0,
82
- class: "uikit-ml-[16px] uikit-flex uikit-size-[24px] uikit-shrink-0 uikit-cursor-pointer uikit-appearance-none uikit-items-center uikit-justify-center uikit-rounded-full uikit-bg-[#C1C8D5]",
83
- "data-cy": "base-snackbar-close-btn"
84
- }, {
85
- default: a(() => [
86
- n(i(V), {
87
- width: 12,
88
- height: 12,
89
- "stroke-color": "#fff"
90
- })
91
- ]),
92
- _: 1
93
- })) : p("", !0)
80
+ d(t.$slots, "default")
94
81
  ]),
95
82
  _: 3
96
83
  }),
97
- e.$slots["toast-action"] ? (r(), s(i(A), {
84
+ e.withCloseIcon ? (r(), u(i(S), {
98
85
  key: 1,
99
- class: "[grid-area:_action]",
86
+ class: k(["uikit-ml-[16px] uikit-flex uikit-size-[24px] uikit-shrink-0 uikit-cursor-pointer uikit-appearance-none uikit-items-center uikit-justify-center uikit-rounded-full uikit-bg-[#C1C8D5]", e.closeClasses]),
87
+ "data-cy": "base-snackbar-close-btn"
88
+ }, {
89
+ default: a(() => [
90
+ d(t.$slots, "toast-close", {}, () => [
91
+ n(i(V), {
92
+ width: 12,
93
+ height: 12,
94
+ "stroke-color": "#fff"
95
+ })
96
+ ])
97
+ ]),
98
+ _: 3
99
+ }, 8, ["class"])) : p("", !0),
100
+ t.$slots["toast-action"] ? (r(), u(i(A), {
101
+ key: 2,
100
102
  "as-child": "",
101
103
  "alt-text": "Goto schedule to undo"
102
104
  }, {
103
105
  default: a(() => [
104
- f(e.$slots, "toast-action")
106
+ d(t.$slots, "toast-action")
105
107
  ]),
106
108
  _: 3
107
109
  })) : p("", !0),
108
110
  n(i(N), {
109
111
  modelValue: o.value,
110
- "onUpdate:modelValue": u[0] || (u[0] = (d) => o.value = d),
112
+ "onUpdate:modelValue": s[0] || (s[0] = (f) => o.value = f),
111
113
  class: "uikit-absolute uikit-bottom-0 uikit-left-0 uikit-h-[4px] uikit-w-full uikit-overflow-hidden"
112
114
  }, {
113
115
  default: a(() => [
@@ -121,19 +123,19 @@ const q = /* @__PURE__ */ x({
121
123
  ]),
122
124
  _: 3
123
125
  }, 8, ["open", "duration", "class", "data-cy", "type"]),
124
- t.to ? (r(), s(i(U), {
126
+ e.to ? (r(), u(i(U), {
125
127
  key: 0,
126
- to: t.to
128
+ to: e.to
127
129
  }, {
128
130
  default: a(() => [
129
131
  n(i(h), {
130
- class: m(["uikit-alert-viewport uikit-m-0 uikit-w-full uikit-list-none uikit-gap-[8px]", t.viewportClasses])
132
+ class: k(["uikit-alert-viewport uikit-m-0 uikit-w-full uikit-list-none uikit-gap-[8px]", e.viewportClasses])
131
133
  }, null, 8, ["class"])
132
134
  ]),
133
135
  _: 1
134
- }, 8, ["to"])) : (r(), s(i(h), {
136
+ }, 8, ["to"])) : (r(), u(i(h), {
135
137
  key: 1,
136
- class: m(["uikit-alert-viewport uikit-m-0 uikit-w-full uikit-list-none uikit-gap-[8px]", t.viewportClasses])
138
+ class: k(["uikit-alert-viewport uikit-m-0 uikit-w-full uikit-list-none uikit-gap-[8px]", e.viewportClasses])
137
139
  }, null, 8, ["class"]))
138
140
  ]),
139
141
  _: 3
@@ -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
+ };