@wikicasa-dev/components 2.3.1-alpha.14 → 2.3.1-alpha.16

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.
@@ -1,11 +1,13 @@
1
1
  import { TabsRootProps } from 'reka-ui';
2
- export interface BaseTabsProps<T extends string | number> extends TabsRootProps<T> {
2
+ export interface BaseTabsProps<T extends string | number> extends Omit<TabsRootProps<T>, "modelValue"> {
3
3
  dataCy?: string;
4
4
  }
5
5
  declare const _default: <T extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
7
- readonly "onUpdate:modelValue"?: ((payload: T) => any) | undefined;
8
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & BaseTabsProps<T> & Partial<{}>> & import('vue').PublicProps;
7
+ readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
8
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue"> & ({
9
+ modelValue?: T;
10
+ } & BaseTabsProps<T>) & Partial<{}>> & import('vue').PublicProps;
9
11
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
10
12
  attrs: any;
11
13
  slots: {
@@ -13,7 +15,7 @@ declare const _default: <T extends string | number>(__VLS_props: NonNullable<Awa
13
15
  modelValue: T;
14
16
  }): any;
15
17
  };
16
- emit: (evt: "update:modelValue", payload: T) => void;
18
+ emit: (evt: "update:modelValue", value: T) => void;
17
19
  }>) => import('vue').VNode & {
18
20
  __ctx?: Awaited<typeof __VLS_setup>;
19
21
  };
@@ -1,13 +1,20 @@
1
1
  import { TabsTriggerProps } from 'reka-ui';
2
- export interface BaseTabsTriggerProps extends TabsTriggerProps {
2
+ export interface BaseTabsTriggerProps<T extends string | number> extends Omit<TabsTriggerProps, "value"> {
3
3
  dataCy?: string;
4
+ value: T;
4
5
  }
5
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<BaseTabsTriggerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BaseTabsTriggerProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
6
- default?(_: {}): any;
7
- }>;
8
- export default _default;
9
- type __VLS_WithTemplateSlots<T, S> = T & {
10
- new (): {
11
- $slots: S;
6
+ declare const _default: <T extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
+ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, never> & BaseTabsTriggerProps<T> & Partial<{}>> & import('vue').PublicProps;
8
+ expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
9
+ attrs: any;
10
+ slots: {
11
+ default?(_: {}): any;
12
12
  };
13
+ emit: {};
14
+ }>) => import('vue').VNode & {
15
+ __ctx?: Awaited<typeof __VLS_setup>;
13
16
  };
17
+ export default _default;
18
+ type __VLS_PrettifyLocal<T> = {
19
+ [K in keyof T]: T[K];
20
+ } & {};
@@ -1,33 +1,37 @@
1
- import { defineComponent as l, createPropsRestProxy as s, createBlock as u, openBlock as m, unref as i, mergeProps as p, withCtx as c, renderSlot as f } from "vue";
2
- import { TabsRoot as y } from "reka-ui";
3
- const V = /* @__PURE__ */ l({
1
+ import { defineComponent as n, mergeModels as r, createPropsRestProxy as u, useModel as s, createBlock as m, openBlock as i, unref as p, mergeProps as f, withCtx as c, renderSlot as y } from "vue";
2
+ import { TabsRoot as V } from "reka-ui";
3
+ const M = /* @__PURE__ */ n({
4
4
  __name: "BaseTabs",
5
- props: {
5
+ props: /* @__PURE__ */ r({
6
6
  dataCy: {},
7
7
  defaultValue: {},
8
8
  orientation: {},
9
9
  dir: {},
10
10
  activationMode: {},
11
- modelValue: {},
12
11
  unmountOnHide: { type: Boolean },
13
12
  asChild: { type: Boolean },
14
13
  as: {}
15
- },
14
+ }, {
15
+ modelValue: {},
16
+ modelModifiers: {}
17
+ }),
16
18
  emits: ["update:modelValue"],
17
- setup(t, { emit: o }) {
18
- const d = o, n = s(t, ["dataCy"]);
19
- return (r, a) => (m(), u(i(y), p({ "data-cy": t.dataCy }, n, {
20
- "onUpdate:modelValue": a[0] || (a[0] = (e) => d("update:modelValue", e))
19
+ setup(e) {
20
+ const l = u(e, ["dataCy"]), a = s(e, "modelValue");
21
+ return (d, t) => (i(), m(p(V), f(l, {
22
+ modelValue: a.value,
23
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => a.value = o),
24
+ "data-cy": e.dataCy
21
25
  }), {
22
- default: c(({ modelValue: e }) => [
23
- f(r.$slots, "default", {
24
- modelValue: e
26
+ default: c(({ modelValue: o }) => [
27
+ y(d.$slots, "default", {
28
+ modelValue: o
25
29
  })
26
30
  ]),
27
31
  _: 3
28
- }, 16, ["data-cy"]));
32
+ }, 16, ["modelValue", "data-cy"]));
29
33
  }
30
34
  });
31
35
  export {
32
- V as default
36
+ M as default
33
37
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as o, createPropsRestProxy as r, createBlock as s, openBlock as i, unref as d, mergeProps as n, withCtx as l, renderSlot as p } from "vue";
2
- import { TabsTrigger as c } from "reka-ui";
3
- const y = /* @__PURE__ */ o({
1
+ import { defineComponent as s, createPropsRestProxy as n, inject as r, onMounted as d, onUnmounted as g, createBlock as u, openBlock as c, unref as l, mergeProps as p, withCtx as m, renderSlot as f } from "vue";
2
+ import { TabsTrigger as y } from "reka-ui";
3
+ const C = /* @__PURE__ */ s({
4
4
  __name: "BaseTabsTrigger",
5
5
  props: {
6
6
  dataCy: {},
@@ -10,15 +10,25 @@ const y = /* @__PURE__ */ o({
10
10
  as: {}
11
11
  },
12
12
  setup(t) {
13
- const e = r(t, ["dataCy"]);
14
- return (a, u) => (i(), s(d(c), n({ "data-cy": t.dataCy }, e, { class: "uikit-bg-white uikit-p-[4px] uikit-text-16 data-[state=active]:uikit-font-semibold" }), {
15
- default: l(() => [
16
- p(a.$slots, "default")
13
+ const e = n(t, ["dataCy"]), a = r(
14
+ "registerTrigger",
15
+ void 0
16
+ ), o = r(
17
+ "unregisterTrigger",
18
+ void 0
19
+ );
20
+ return d(() => {
21
+ a?.(e.value);
22
+ }), g(() => {
23
+ o?.(e.value);
24
+ }), (i, T) => (c(), u(l(y), p({ "data-cy": t.dataCy }, e, { class: "uikit-bg-white uikit-p-[4px] uikit-text-16 data-[state=active]:uikit-font-semibold" }), {
25
+ default: m(() => [
26
+ f(i.$slots, "default")
17
27
  ]),
18
28
  _: 3
19
29
  }, 16, ["data-cy"]));
20
30
  }
21
31
  });
22
32
  export {
23
- y as default
33
+ C as default
24
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.3.1-alpha.14",
3
+ "version": "2.3.1-alpha.16",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",