@caipira/tamandua 0.0.46 → 0.0.47

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,5 +1,5 @@
1
1
  import './Drawer.css';
2
- import { defineComponent as _, ref as b, onMounted as v, resolveComponent as y, openBlock as t, createElementBlock as r, withKeys as h, createVNode as i, createElementVNode as c, normalizeClass as d, toDisplayString as k, createCommentVNode as s, renderSlot as a } from "vue";
2
+ import { defineComponent as _, ref as b, onMounted as v, resolveComponent as y, openBlock as t, createElementBlock as r, withKeys as h, createVNode as i, createElementVNode as d, normalizeClass as c, toDisplayString as k, createCommentVNode as s, renderSlot as a } from "vue";
3
3
  import { _ as w } from "./Backdrop.vue_vue_type_script_setup_true_lang-OaEBTmYK.js";
4
4
  import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const C = {
@@ -36,8 +36,8 @@ const C = {
36
36
  onKeyup: h(l, ["esc"])
37
37
  }, [
38
38
  i(w, { onClick: l }),
39
- c("div", {
40
- class: d(["w-[38rem] absolute inset-y-0 z-10 flex flex-col bg-caipira-primary drawer", {
39
+ d("div", {
40
+ class: c(["w-[38rem] absolute inset-y-0 z-10 flex flex-col bg-caipira-primary drawer", {
41
41
  "right-0 drop-shadow-lg": o.direction === "ltr",
42
42
  "left-0": o.direction === "rtl"
43
43
  }])
@@ -46,19 +46,19 @@ const C = {
46
46
  variant: "transparent",
47
47
  size: "lg",
48
48
  icon: "close",
49
- class: "absolute top-0 right-0",
49
+ class: "absolute top-1 right-0",
50
50
  onClick: l
51
51
  }),
52
52
  o.showHeader ? (t(), r("div", C, [
53
53
  o.title ? (t(), r("span", $, k(o.title), 1)) : s("", !0),
54
54
  e.$slots.header ? a(e.$slots, "header", { key: 1 }, void 0, !0) : s("", !0)
55
55
  ])) : s("", !0),
56
- c("div", x, [
56
+ d("div", x, [
57
57
  a(e.$slots, "default", {}, void 0, !0)
58
58
  ]),
59
59
  e.$slots.footer ? (t(), r("div", {
60
60
  key: 1,
61
- class: d(["p-4 border-t border-color", {
61
+ class: c(["p-4 border-t border-color", {
62
62
  [e.style.footer]: !0
63
63
  }])
64
64
  }, [
@@ -68,7 +68,7 @@ const C = {
68
68
  ], 544);
69
69
  };
70
70
  }
71
- }), E = /* @__PURE__ */ g(D, [["__scopeId", "data-v-1c88d1cf"]]);
71
+ }), E = /* @__PURE__ */ g(D, [["__scopeId", "data-v-dd2ff7d0"]]);
72
72
  export {
73
73
  E as D
74
74
  };
package/dist/Drawer.css CHANGED
@@ -1 +1 @@
1
- .drawer[data-v-1c88d1cf]{box-shadow:#0003 0 8px 10px -5px,#00000024 0 16px 24px 2px,#0000001f 0 6px 30px 5px}
1
+ .drawer[data-v-dd2ff7d0]{box-shadow:#0003 0 8px 10px -5px,#00000024 0 16px 24px 2px,#0000001f 0 6px 30px 5px}
package/dist/Drawer.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as e } from "./Drawer-CKfQZ6rv.js";
2
- import { p } from "./plugin-BV0OSVIw.js";
1
+ import { D as e } from "./Drawer-Cl9_4uHA.js";
2
+ import { p } from "./plugin-CNwzCYlr.js";
3
3
  export {
4
4
  e as Drawer,
5
5
  p as DrawerPlugin
package/dist/Form.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-35_V6mw8.js";
2
- import { p as a } from "./plugin-DcQ8tvKe.js";
1
+ import { _ as m } from "./Form.vue_vue_type_script_setup_true_lang-DfBtuwm7.js";
2
+ import { p as a } from "./plugin-BJJ1-Os1.js";
3
3
  export {
4
4
  m as Form,
5
5
  a as FormPlugin
@@ -157,10 +157,10 @@ const X = /* @__PURE__ */ C({
157
157
  name: "TForm",
158
158
  __name: "Form",
159
159
  props: {
160
- id: { default: "" },
161
160
  schema: { default: () => ({}) },
162
161
  layout: { default: "horizontal" },
163
162
  formStyle: { default: () => ({}) },
163
+ identifier: { default: "" },
164
164
  showSubmit: { type: Boolean, default: !1 },
165
165
  buttonProps: {},
166
166
  submissionFormat: { default: f.FormData },
@@ -169,7 +169,7 @@ const X = /* @__PURE__ */ C({
169
169
  emits: ["submit", "change"],
170
170
  setup(e, { expose: t, emit: r }) {
171
171
  const s = e, c = r, a = _(), { form: m, getValue: o, setValue: d, setValues: b, reset: y, submit: g } = K({
172
- id: N(() => s.id),
172
+ id: N(() => s.identifier),
173
173
  schema: s.schema,
174
174
  format: s.submissionFormat
175
175
  }), w = async () => {
package/dist/ModalForm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as a } from "./ModalForm.vue_vue_type_script_setup_true_lang-B4dU1AzJ.js";
2
- import { p as l } from "./plugin-DmPqmScT.js";
1
+ import { _ as a } from "./ModalForm.vue_vue_type_script_setup_true_lang-RfK0Mn81.js";
2
+ import { p as l } from "./plugin-DNXazWwT.js";
3
3
  export {
4
4
  a as ModalForm,
5
5
  l as ModalFormPlugin
@@ -1,4 +1,4 @@
1
- import { defineComponent as F, ref as d, computed as K, resolveComponent as o, openBlock as n, createBlock as i, withCtx as s, createElementVNode as L, createCommentVNode as u, renderSlot as M, createElementBlock as R, createVNode as m, normalizeClass as j, resolveDynamicComponent as H, mergeProps as I, toHandlers as O } from "vue";
1
+ import { defineComponent as F, ref as d, computed as K, resolveComponent as o, openBlock as l, createBlock as i, withCtx as s, createElementVNode as L, createCommentVNode as u, renderSlot as M, createElementBlock as R, createVNode as m, normalizeClass as j, resolveDynamicComponent as H, mergeProps as I, toHandlers as O } from "vue";
2
2
  import { C as P } from "./crud-n73o4CzO.js";
3
3
  const T = { class: "flex items-baseline justify-between w-full" }, U = {
4
4
  key: 0,
@@ -13,8 +13,8 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
13
13
  },
14
14
  emits: ["saved", "deleted", "closed"],
15
15
  setup(y, { expose: k, emit: g }) {
16
- const r = y, v = g, e = d(), p = d(!1), _ = d(""), c = d(), l = K(() => r.forms.find((a) => a.key === _.value)), w = (a, t) => {
17
- _.value = a, e.value = new P(l.value?.title, c), t ? e.value?.edit(t) : e.value?.show();
16
+ const r = y, v = g, e = d(), p = d(!1), _ = d(""), c = d(), n = K(() => r.forms.find((a) => a.key === _.value)), w = (a, t) => {
17
+ _.value = a, e.value = new P(n.value?.title, c), t ? e.value?.edit(t) : e.value?.show();
18
18
  }, h = () => {
19
19
  e.value?.onSave(!p.value), v("saved");
20
20
  }, x = () => {
@@ -28,14 +28,14 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
28
28
  };
29
29
  return k({ open: w, delete: b, submit: S, reset: V }), (a, t) => {
30
30
  const E = o("t-input-switch"), B = o("t-icon"), N = o("t-dropdown"), $ = o("t-popover"), C = o("t-button"), z = o("t-popconfirm"), A = o("t-modal");
31
- return e.value?.visible ? (n(), i(A, {
31
+ return e.value?.visible ? (l(), i(A, {
32
32
  key: 0,
33
33
  title: e.value?.title,
34
34
  onClosed: D
35
35
  }, {
36
36
  header: s(() => [
37
37
  L("div", T, [
38
- l.value?.pinnable && !e.value?.isEditing ? (n(), i(E, {
38
+ n.value?.pinnable && !e.value?.isEditing ? (l(), i(E, {
39
39
  key: 0,
40
40
  modelValue: p.value,
41
41
  "onUpdate:modelValue": t[0] || (t[0] = (f) => p.value = f),
@@ -46,7 +46,7 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
46
46
  ])
47
47
  ]),
48
48
  footer: s(() => [
49
- r.options.length ? (n(), R("div", U, [
49
+ r.options.length ? (l(), R("div", U, [
50
50
  m($, { placement: "bottom-start" }, {
51
51
  content: s(() => [
52
52
  m(N, {
@@ -64,13 +64,13 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
64
64
  ]),
65
65
  _: 1
66
66
  })
67
- ])) : (n(), i(z, {
67
+ ])) : (l(), i(z, {
68
68
  key: 1,
69
- message: `Are you sure you want to delete this ${l.value?.title}?`,
69
+ message: `Are you sure you want to delete this ${n.value?.title}?`,
70
70
  onConfirm: b
71
71
  }, {
72
72
  default: s(({ onTogglePopover: f }) => [
73
- e.value?.isEditing ? (n(), i(C, {
73
+ e.value?.isEditing ? (l(), i(C, {
74
74
  key: 0,
75
75
  variant: "danger",
76
76
  icon: "trash-can-outline",
@@ -94,16 +94,16 @@ const T = { class: "flex items-baseline justify-between w-full" }, U = {
94
94
  }, null, 8, ["label", "is-disabled", "class"])
95
95
  ]),
96
96
  default: s(() => [
97
- l.value ? (n(), i(H(l.value.component), I({
97
+ n.value ? (l(), i(H(n.value.component), I({
98
98
  key: 0,
99
- id: `${e.value?.id}`,
99
+ identifier: `${e.value?.id}`,
100
100
  class: [r.formClass],
101
101
  ref_key: "formReference",
102
102
  ref: c
103
- }, O(l.value?.events), {
103
+ }, O(n.value?.events ?? {}), {
104
104
  onDeleted: x,
105
105
  onSaved: h
106
- }), null, 16, ["id", "class"])) : u("", !0)
106
+ }), null, 16, ["identifier", "class"])) : u("", !0)
107
107
  ]),
108
108
  _: 3
109
109
  }, 8, ["title"])) : u("", !0);
@@ -3,10 +3,10 @@ import { _ as p } from "./Backdrop.vue_vue_type_script_setup_true_lang-OaEBTmYK.
3
3
  import { B as s } from "./Button-DusGbcIs.js";
4
4
  import { _ as f } from "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
5
5
  import { _ as n } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-DzIPutlk.js";
6
- import { D as u } from "./Drawer-CKfQZ6rv.js";
6
+ import { D as u } from "./Drawer-Cl9_4uHA.js";
7
7
  import { _ as l } from "./Dropdown.vue_vue_type_script_setup_true_lang-pjG__bX2.js";
8
8
  import { _ as h } from "./FileDrop.vue_vue_type_script_setup_true_lang-DLEH_LLX.js";
9
- import { _ as T } from "./Form.vue_vue_type_script_setup_true_lang-35_V6mw8.js";
9
+ import { _ as T } from "./Form.vue_vue_type_script_setup_true_lang-DfBtuwm7.js";
10
10
  import { _ as y } from "./FormItem.vue_vue_type_script_setup_true_lang-D7a8YCgS.js";
11
11
  import { _ as C } from "./GraphyEmpty.vue_vue_type_script_setup_true_lang-B-hAjDCw.js";
12
12
  import { _ as G } from "./GraphyLabel.vue_vue_type_script_setup_true_lang-n_0200p7.js";
@@ -30,7 +30,7 @@ import { _ as er } from "./InputText.vue_vue_type_script_setup_true_lang-JLAlUE_
30
30
  import { _ as pr } from "./InputTextarea.vue_vue_type_script_setup_true_lang-DRo5eIw4.js";
31
31
  import { _ as sr } from "./Link.vue_vue_type_script_setup_true_lang-gTf77Jvd.js";
32
32
  import { _ as fr } from "./Modal.vue_vue_type_script_setup_true_lang-CEaX1svl.js";
33
- import { _ as nr } from "./ModalForm.vue_vue_type_script_setup_true_lang-B4dU1AzJ.js";
33
+ import { _ as nr } from "./ModalForm.vue_vue_type_script_setup_true_lang-RfK0Mn81.js";
34
34
  import { _ as ur } from "./Pagination.vue_vue_type_script_setup_true_lang-PLZQJUd0.js";
35
35
  import { _ as lr } from "./Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js";
36
36
  import { _ as hr } from "./Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js";
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./Form.vue_vue_type_script_setup_true_lang-35_V6mw8.js";
2
+ import { _ as s } from "./Form.vue_vue_type_script_setup_true_lang-DfBtuwm7.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -1,5 +1,5 @@
1
1
  import { r as o } from "./register-component-B-fdqewb.js";
2
- import { D as t } from "./Drawer-CKfQZ6rv.js";
2
+ import { D as t } from "./Drawer-Cl9_4uHA.js";
3
3
  const a = {
4
4
  install(r) {
5
5
  o(r, t);
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./ModalForm.vue_vue_type_script_setup_true_lang-B4dU1AzJ.js";
2
+ import { _ as s } from "./ModalForm.vue_vue_type_script_setup_true_lang-RfK0Mn81.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -8,12 +8,12 @@ import "./transform-DSaNEFMr.js";
8
8
  import "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
9
9
  import { p as o } from "./plugin-DDXOF4cU.js";
10
10
  import { p as n } from "./plugin-D4x3uASg.js";
11
- import "./Drawer-CKfQZ6rv.js";
12
- import { p as m } from "./plugin-BV0OSVIw.js";
11
+ import "./Drawer-Cl9_4uHA.js";
12
+ import { p as m } from "./plugin-CNwzCYlr.js";
13
13
  import { p as u } from "./plugin-CNqL90UL.js";
14
14
  import { p as l } from "./plugin-BscWXR9h.js";
15
- import "./Form.vue_vue_type_script_setup_true_lang-35_V6mw8.js";
16
- import { p as t } from "./plugin-DcQ8tvKe.js";
15
+ import "./Form.vue_vue_type_script_setup_true_lang-DfBtuwm7.js";
16
+ import { p as t } from "./plugin-BJJ1-Os1.js";
17
17
  import { p as g } from "./plugin-CvohbpUQ.js";
18
18
  import { p as a } from "./plugin-Buc7eEox.js";
19
19
  import { p as s } from "./plugin-D9k93Uu1.js";
@@ -42,7 +42,7 @@ import { p as w } from "./plugin-BQFwx3d5.js";
42
42
  import "./Link.vue_vue_type_script_setup_true_lang-gTf77Jvd.js";
43
43
  import { p as x } from "./plugin-DHstqRmE.js";
44
44
  import { p as D } from "./plugin-DKjcKBPg.js";
45
- import { p as F } from "./plugin-DmPqmScT.js";
45
+ import { p as F } from "./plugin-DNXazWwT.js";
46
46
  import { p as L } from "./plugin-YUomn9tF.js";
47
47
  import "./Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js";
48
48
  import { p as M } from "./plugin-Ee4Z5Rtp.js";
package/dist/plugins.js CHANGED
@@ -8,12 +8,12 @@ import "./transform-DSaNEFMr.js";
8
8
  import "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
9
9
  import { p as v } from "./plugin-DDXOF4cU.js";
10
10
  import { p as D } from "./plugin-D4x3uASg.js";
11
- import "./Drawer-CKfQZ6rv.js";
12
- import { p as L } from "./plugin-BV0OSVIw.js";
11
+ import "./Drawer-Cl9_4uHA.js";
12
+ import { p as L } from "./plugin-CNwzCYlr.js";
13
13
  import { p as A } from "./plugin-CNqL90UL.js";
14
14
  import { p as E } from "./plugin-BscWXR9h.js";
15
- import "./Form.vue_vue_type_script_setup_true_lang-35_V6mw8.js";
16
- import { p as j } from "./plugin-DcQ8tvKe.js";
15
+ import "./Form.vue_vue_type_script_setup_true_lang-DfBtuwm7.js";
16
+ import { p as j } from "./plugin-BJJ1-Os1.js";
17
17
  import { p as z } from "./plugin-CvohbpUQ.js";
18
18
  import { p as J } from "./plugin-Buc7eEox.js";
19
19
  import { p as N } from "./plugin-D9k93Uu1.js";
@@ -42,7 +42,7 @@ import { p as Cr } from "./plugin-BQFwx3d5.js";
42
42
  import "./Link.vue_vue_type_script_setup_true_lang-gTf77Jvd.js";
43
43
  import { p as Sr } from "./plugin-DHstqRmE.js";
44
44
  import { p as vr } from "./plugin-DKjcKBPg.js";
45
- import { p as Dr } from "./plugin-DmPqmScT.js";
45
+ import { p as Dr } from "./plugin-DNXazWwT.js";
46
46
  import { p as Lr } from "./plugin-YUomn9tF.js";
47
47
  import "./Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js";
48
48
  import { p as Ar } from "./plugin-Ee4Z5Rtp.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-8zKsGUYL.js";
1
+ import { p as n } from "./plugins-DFHv5iXr.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
@@ -3,10 +3,10 @@ import { FormSchema, FormInstance } from '../../types/form.js';
3
3
  import { FormEvents } from './types.js';
4
4
 
5
5
  declare const _default: <T extends FormSchema>(__VLS_props: {
6
- id?: string | number | undefined;
7
6
  schema?: T | undefined;
8
7
  layout?: import('./types.js').FormLayout | undefined;
9
8
  formStyle?: import('./types.js').FormStyle | undefined;
9
+ identifier?: string | number | undefined;
10
10
  showSubmit?: boolean | undefined;
11
11
  buttonProps?: import('../types.js').ButtonProps | undefined;
12
12
  submissionFormat?: FormSubmissionFormat | undefined;
@@ -31,10 +31,10 @@ declare const _default: <T extends FormSchema>(__VLS_props: {
31
31
  getValue: (key: keyof import("vue").UnwrapNestedRefs<FormInstance<T extends undefined ? never : T>>) => import("vue").UnwrapNestedRefs<FormInstance<T extends undefined ? never : T>>[keyof import("vue").UnwrapNestedRefs<FormInstance<T extends undefined ? never : T>>];
32
32
  }>) => void) | undefined, __VLS_setup?: Promise<{
33
33
  props: {
34
- id?: string | number | undefined;
35
34
  schema?: T | undefined;
36
35
  layout?: import('./types.js').FormLayout | undefined;
37
36
  formStyle?: import('./types.js').FormStyle | undefined;
37
+ identifier?: string | number | undefined;
38
38
  showSubmit?: boolean | undefined;
39
39
  buttonProps?: import('../types.js').ButtonProps | undefined;
40
40
  submissionFormat?: FormSubmissionFormat | undefined;
@@ -63,10 +63,10 @@ declare const _default: <T extends FormSchema>(__VLS_props: {
63
63
  }> & {
64
64
  __ctx?: {
65
65
  props: {
66
- id?: string | number | undefined;
67
66
  schema?: T | undefined;
68
67
  layout?: import('./types.js').FormLayout | undefined;
69
68
  formStyle?: import('./types.js').FormStyle | undefined;
69
+ identifier?: string | number | undefined;
70
70
  showSubmit?: boolean | undefined;
71
71
  buttonProps?: import('../types.js').ButtonProps | undefined;
72
72
  submissionFormat?: FormSubmissionFormat | undefined;
@@ -7,10 +7,10 @@ export type FormStyle = {
7
7
  };
8
8
  export type FormLayout = "horizontal" | "vertical" | "inline";
9
9
  export type FormProps<T extends FormSchema> = {
10
- id?: string | number;
11
10
  schema?: T;
12
11
  layout?: FormLayout;
13
12
  formStyle?: FormStyle;
13
+ identifier?: string | number;
14
14
  showSubmit?: boolean;
15
15
  buttonProps?: ButtonProps;
16
16
  submissionFormat?: FormSubmissionFormat;
@@ -21,7 +21,7 @@ export declare const ModalForm: (args: any) => {
21
21
  args: any;
22
22
  modalForm: import('vue').Ref<any>;
23
23
  onChange: () => void;
24
- openForm: () => void;
24
+ openForm: () => any;
25
25
  Form: {
26
26
  setup(): {
27
27
  schema: FormSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "https://github.com/caipira-io/tamandua.git"
14
+ "url": "git+https://github.com/caipira-io/tamandua.git"
15
15
  },
16
16
  "type": "module",
17
17
  "typesVersions": {