@caipira/tamandua 0.0.30 → 0.0.32

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 (69) hide show
  1. package/README.md +1 -0
  2. package/dist/Avatar.js +2 -2
  3. package/dist/Avatar.vue_vue_type_script_setup_true_lang-C8p8_0Uc.js +47 -0
  4. package/dist/{Button-COkapD0v.js → Button-CAiIEdkK.js} +47 -46
  5. package/dist/Button.css +1 -1
  6. package/dist/Button.js +2 -2
  7. package/dist/Dropdown.js +2 -2
  8. package/dist/{Dropdown.vue_vue_type_script_setup_true_lang-Bt-imwu7.js → Dropdown.vue_vue_type_script_setup_true_lang-pjG__bX2.js} +1 -1
  9. package/dist/Icon.js +2 -2
  10. package/dist/Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js +45 -0
  11. package/dist/InputCheckbox.js +2 -2
  12. package/dist/{InputCheckbox.vue_vue_type_script_setup_true_lang-DUczNK1m.js → InputCheckbox.vue_vue_type_script_setup_true_lang-Bh8HA3Ay.js} +8 -8
  13. package/dist/InputDate.js +2 -2
  14. package/dist/InputDate.vue_vue_type_script_setup_true_lang-BAgG9zPV.js +188 -0
  15. package/dist/InputPhone.js +2 -2
  16. package/dist/{InputPhone.vue_vue_type_script_setup_true_lang-DXtliNyv.js → InputPhone.vue_vue_type_script_setup_true_lang-B4TULqLW.js} +24 -23
  17. package/dist/InputPrice.js +2 -2
  18. package/dist/InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js +67 -0
  19. package/dist/InputRadio.js +2 -2
  20. package/dist/{InputRadio.vue_vue_type_script_setup_true_lang-Dqbov2kN.js → InputRadio.vue_vue_type_script_setup_true_lang-Cu7lzDAh.js} +7 -7
  21. package/dist/InputSelect.js +2 -2
  22. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-BlA3DIYZ.js +232 -0
  23. package/dist/Popconfirm.js +2 -2
  24. package/dist/Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js +62 -0
  25. package/dist/Popover.js +2 -2
  26. package/dist/Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js +987 -0
  27. package/dist/{Table-COkg498M.js → Table-C0Sr_Lfm.js} +2 -2
  28. package/dist/Table.css +1 -1
  29. package/dist/Table.js +2 -2
  30. package/dist/Tag.js +2 -2
  31. package/dist/Tag.vue_vue_type_script_setup_true_lang-CgX-nT8V.js +74 -0
  32. package/dist/components.js +14 -14
  33. package/dist/composables.js +27 -16
  34. package/dist/index.css +2 -1
  35. package/dist/{plugin-VtriDxZB.js → plugin-Bog7k3Qf.js} +1 -1
  36. package/dist/{plugin-Dy14_LJS.js → plugin-BtF6kCcf.js} +1 -1
  37. package/dist/{plugin-BwRXtPzh.js → plugin-CNqL90UL.js} +1 -1
  38. package/dist/{plugin-B2fe1hFi.js → plugin-CTMcmMdr.js} +1 -1
  39. package/dist/{plugin-Dp-F27SY.js → plugin-CdJ1wBq2.js} +1 -1
  40. package/dist/{plugin-CGIfywdY.js → plugin-CrHDShgh.js} +1 -1
  41. package/dist/{plugin-CClGi0co.js → plugin-D8CsjFdw.js} +1 -1
  42. package/dist/{plugin-BOXtmhcZ.js → plugin-DDoM02Fq.js} +1 -1
  43. package/dist/{plugin-B97SpnhW.js → plugin-DLkeyKDM.js} +1 -1
  44. package/dist/{plugin-BR7RSh1H.js → plugin-Daf_swsz.js} +1 -1
  45. package/dist/{plugin-CBhgqomZ.js → plugin-DcWjzc_X.js} +1 -1
  46. package/dist/{plugin-BriPeDzu.js → plugin-Dk3KBChD.js} +1 -1
  47. package/dist/{plugin-Bt6de9ZA.js → plugin-Ee4Z5Rtp.js} +1 -1
  48. package/dist/{plugin-DgCWOSWh.js → plugin-z8Hr_T_O.js} +1 -1
  49. package/dist/{plugins-CxgvV4Py.js → plugins-ChB184ip.js} +22 -22
  50. package/dist/plugins.js +22 -22
  51. package/dist/tamandua.js +1 -1
  52. package/dist/types/components/InputSelect/types.d.ts +3 -1
  53. package/dist/types/components/Popconfirm/Popconfirm.vue.d.ts +3 -1
  54. package/dist/types/components/Popover/Popover.vue.d.ts +51 -35
  55. package/dist/types/components/Popover/types.d.ts +7 -1
  56. package/dist/types/composables/useDomHelpers.d.ts +0 -4
  57. package/dist/useDomHelpers-CGVrQd35.js +19 -0
  58. package/package.json +3 -3
  59. package/dist/Avatar.vue_vue_type_script_setup_true_lang-Cjz3Vlw9.js +0 -51
  60. package/dist/Icon.vue_vue_type_script_setup_true_lang-CNUyv7CY.js +0 -49
  61. package/dist/InputDate.vue_vue_type_script_setup_true_lang-Do47MTJJ.js +0 -188
  62. package/dist/InputPrice.vue_vue_type_script_setup_true_lang-DBMW1AwZ.js +0 -66
  63. package/dist/InputSelect.vue_vue_type_script_setup_true_lang-ukwmeVxc.js +0 -226
  64. package/dist/Popconfirm.vue_vue_type_script_setup_true_lang-BNpLdXq7.js +0 -63
  65. package/dist/Popover.vue_vue_type_script_setup_true_lang-B4Polh2y.js +0 -985
  66. package/dist/Tag.vue_vue_type_script_setup_true_lang-0p-7UEvO.js +0 -72
  67. package/dist/types/components/EventListener/EventListener.vue.d.ts +0 -6
  68. package/dist/useDomHelpers-5CFMo6bx.js +0 -23
  69. package/dist/useRender-D8PeooXE.js +0 -16
package/README.md CHANGED
@@ -23,3 +23,4 @@ npx vite-bundle-visualizer
23
23
  [Storybook](https://storybook.js.org/docs/get-started/vue3-vite)
24
24
  [TailwindCSS](https://tailwindcss.com/)
25
25
  [FakerJS](https://next.fakerjs.dev/api)
26
+ [FloatingUI](https://floating-ui.com/docs/vue)
package/dist/Avatar.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as o } from "./Avatar.vue_vue_type_script_setup_true_lang-Cjz3Vlw9.js";
2
- import { p } from "./plugin-BOXtmhcZ.js";
1
+ import { _ as o } from "./Avatar.vue_vue_type_script_setup_true_lang-C8p8_0Uc.js";
2
+ import { p } from "./plugin-DDoM02Fq.js";
3
3
  export {
4
4
  o as Avatar,
5
5
  p as AvatarPlugin
@@ -0,0 +1,47 @@
1
+ import { defineComponent as c, computed as d, resolveComponent as m, openBlock as a, createElementBlock as o, normalizeClass as u, unref as t, createBlock as p, toDisplayString as f, createCommentVNode as h } from "vue";
2
+ import { a as l, b as i } from "./ui-BC6H9E93.js";
3
+ const _ = ["role"], y = ["src"], S = { key: 2 }, w = /* @__PURE__ */ c({
4
+ name: "TAvatar",
5
+ __name: "Avatar",
6
+ props: {
7
+ icon: {},
8
+ text: { default: "" },
9
+ role: { default: "" },
10
+ size: { default: l.Default },
11
+ image: { default: "" },
12
+ shape: { default: i.Circle },
13
+ disableStyle: { type: Boolean, default: !1 }
14
+ },
15
+ setup(r) {
16
+ const e = r, s = d(() => e.role !== "" ? e.role : "");
17
+ return (z, b) => {
18
+ const n = m("t-icon");
19
+ return a(), o("div", {
20
+ role: s.value,
21
+ class: u([{
22
+ "h-5 w-5": !e.disableStyle && e.size === t(l).ExtraSmall,
23
+ "h-7 w-7": !e.disableStyle && e.size === t(l).Small,
24
+ "h-10 w-10": !e.disableStyle && e.size === t(l).Default,
25
+ "h-20 w-20": !e.disableStyle && e.size === t(l).Large,
26
+ "h-40 w-40": !e.disableStyle && e.size === t(l).ExtraLarge,
27
+ "rounded-full": e.shape === t(i).Circle,
28
+ rounded: e.shape === t(i).Square
29
+ }, "overflow-hidden inline-flex items-center justify-center bg-caipira-primary-inverted"])
30
+ }, [
31
+ e.image ? (a(), o("img", {
32
+ key: 0,
33
+ class: "w-full h-full object-cover",
34
+ src: e.image
35
+ }, null, 8, y)) : e.icon ? (a(), p(n, {
36
+ key: 1,
37
+ class: "color-caipira-primary",
38
+ icon: e.icon,
39
+ size: e.size
40
+ }, null, 8, ["icon", "size"])) : e.text ? (a(), o("span", S, f(e.text), 1)) : h("", !0)
41
+ ], 10, _);
42
+ };
43
+ }
44
+ });
45
+ export {
46
+ w as _
47
+ };
@@ -1,11 +1,10 @@
1
1
  import './Button.css';
2
- import { defineComponent as D, useSlots as U, getCurrentInstance as L, ref as y, computed as p, resolveComponent as k, openBlock as s, createBlock as h, resolveDynamicComponent as P, normalizeClass as F, unref as a, withCtx as M, renderSlot as G, mergeProps as O, createCommentVNode as d, createElementBlock as b, Fragment as W, createTextVNode as V, toDisplayString as Y } from "vue";
3
- import { c as i, a as t, b as f, B as r } from "./ui-BC6H9E93.js";
4
- import { g } from "./index-CVD_wAsU.js";
5
- import { u as H } from "./useDomHelpers-5CFMo6bx.js";
6
- import "./Icon.vue_vue_type_script_setup_true_lang-CNUyv7CY.js";
7
- import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- const $ = ["multiple"], j = /* @__PURE__ */ D({
2
+ import { defineComponent as _, useSlots as z, getCurrentInstance as A, ref as v, computed as p, resolveComponent as U, openBlock as s, createBlock as y, resolveDynamicComponent as D, normalizeClass as L, unref as a, withCtx as k, renderSlot as F, mergeProps as P, createCommentVNode as m, createElementBlock as h, Fragment as M, createTextVNode as G, toDisplayString as O } from "vue";
3
+ import { c as i, a as t, b as d, B as r } from "./ui-BC6H9E93.js";
4
+ import { g as b } from "./index-CVD_wAsU.js";
5
+ import "./Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js";
6
+ import { _ as W } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const V = ["multiple"], Y = /* @__PURE__ */ _({
9
8
  name: "TButton",
10
9
  __name: "Button",
11
10
  props: {
@@ -13,7 +12,7 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
13
12
  type: { default: i.BUTTON },
14
13
  size: { default: t.Default },
15
14
  label: { default: "" },
16
- shape: { default: f.Rounded },
15
+ shape: { default: d.Rounded },
17
16
  hover: { type: Boolean, default: !0 },
18
17
  variant: { default: r.DEFAULT },
19
18
  outline: { type: Boolean, default: !1 },
@@ -23,8 +22,10 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
23
22
  animate: {}
24
23
  },
25
24
  emits: ["upload"],
26
- setup(S, { expose: x, emit: E }) {
27
- const e = S, T = E, B = U(), u = L(), v = y(), m = y(null), { isPopoverActivator: C, onPopoverActivatorClick: I } = H(), R = p(() => {
25
+ setup(g, { expose: S, emit: x }) {
26
+ const e = g, E = x, T = z();
27
+ A();
28
+ const f = v(), u = v(null), B = p(() => {
28
29
  switch (e.type) {
29
30
  case i.SUBMIT:
30
31
  return "submit";
@@ -33,7 +34,7 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
33
34
  default:
34
35
  return "button";
35
36
  }
36
- }), w = p(() => e.type === i.SUBMIT ? e.label : void 0), A = p(() => {
37
+ }), C = p(() => e.type === i.SUBMIT ? e.label : void 0), I = p(() => {
37
38
  switch (e.type) {
38
39
  case i.SUBMIT:
39
40
  return "input";
@@ -42,23 +43,23 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
42
43
  default:
43
44
  return "button";
44
45
  }
45
- }), N = (o) => {
46
- if (u && C(u) && I(o, u), e.type === i.SUBMIT && o.preventDefault(), e.type === i.FILE && v.value?.click(), e.animate) {
47
- let l = null;
48
- e.animate.target === "icon" && (l = m.value?.reference), l && g.to(l, {
46
+ }), R = (l) => {
47
+ if (e.type === i.SUBMIT && l.preventDefault(), e.type === i.FILE && f.value?.click(), e.animate) {
48
+ let o = null;
49
+ e.animate.target === "icon" && (o = u.value?.reference), o && b.to(o, {
49
50
  duration: 0.2,
50
51
  ...e.animate.animation,
51
52
  ease: "power3.easeInOut",
52
53
  onComplete: () => {
53
- g.set(l, e.animate?.reset);
54
+ b.set(o, e.animate?.reset);
54
55
  }
55
56
  });
56
57
  }
57
- }, _ = (o) => {
58
- o.stopPropagation();
59
- const c = o.target.files;
60
- !c || !c.length || T("upload", c);
61
- }, z = p(() => {
58
+ }, w = (l) => {
59
+ l.stopPropagation();
60
+ const c = l.target.files;
61
+ !c || !c.length || E("upload", c);
62
+ }, N = p(() => {
62
63
  switch (e.size) {
63
64
  case t.ExtraSmall:
64
65
  return 12;
@@ -73,14 +74,14 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
73
74
  default:
74
75
  return 20;
75
76
  }
76
- }), n = p(() => !!e.label || !!B.default);
77
- return x({ iconReference: m }), (o, l) => {
78
- const c = k("t-icon");
79
- return s(), h(P(A.value), {
80
- type: R.value,
81
- value: w.value,
77
+ }), n = p(() => !!e.label || !!T.default);
78
+ return S({ iconReference: u }), (l, o) => {
79
+ const c = U("t-icon");
80
+ return s(), y(D(I.value), {
81
+ type: B.value,
82
+ value: C.value,
82
83
  disabled: e.disabled,
83
- class: F([{
84
+ class: L([{
84
85
  // Size
85
86
  "text-xs px-1 h-4": e.size === a(t).ExtraSmall,
86
87
  "text-sm px-2 h-7": e.size === a(t).Small,
@@ -90,8 +91,8 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
90
91
  // Border
91
92
  border: e.outline,
92
93
  // Shape
93
- "rounded-full": e.shape === a(f).Circle,
94
- "input-roundness": e.shape === a(f).Rounded,
94
+ "rounded-full": e.shape === a(d).Circle,
95
+ "input-roundness": e.shape === a(d).Rounded,
95
96
  // Disabled
96
97
  "cursor-not-allowed opacity-50": e.disabled,
97
98
  // Default color
@@ -121,15 +122,15 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
121
122
  "transparent-hover": e.variant === a(r).TRANSPARENT && e.hover
122
123
  }, "input-outline flex items-center select-none whitespace-nowrap"]),
123
124
  role: "button",
124
- onClick: N
125
+ onClick: R
125
126
  }, {
126
- default: M(() => [
127
- G(o.$slots, "default", {}, void 0, !0),
128
- e.icon ? (s(), h(c, O({
127
+ default: k(() => [
128
+ F(l.$slots, "default", {}, void 0, !0),
129
+ e.icon ? (s(), y(c, P({
129
130
  key: 0,
130
131
  ref_key: "iconReference",
131
- ref: m,
132
- size: z.value,
132
+ ref: u,
133
+ size: N.value,
133
134
  icon: e.icon,
134
135
  class: {
135
136
  "mr-1": n.value && e.size === a(t).ExtraSmall,
@@ -138,25 +139,25 @@ const $ = ["multiple"], j = /* @__PURE__ */ D({
138
139
  "mr-2.5": n.value && e.size === a(t).Large,
139
140
  "mr-3": n.value && e.size === a(t).ExtraLarge
140
141
  }
141
- }, e.iconProps), null, 16, ["size", "icon", "class"])) : d("", !0),
142
- e.label && e.type !== a(i).SUBMIT ? (s(), b(W, { key: 1 }, [
143
- V(Y(e.label), 1)
144
- ], 64)) : d("", !0),
145
- e.type === "file" ? (s(), b("input", {
142
+ }, e.iconProps), null, 16, ["size", "icon", "class"])) : m("", !0),
143
+ e.label && e.type !== a(i).SUBMIT ? (s(), h(M, { key: 1 }, [
144
+ G(O(e.label), 1)
145
+ ], 64)) : m("", !0),
146
+ e.type === "file" ? (s(), h("input", {
146
147
  key: 2,
147
148
  multiple: e.multiple,
148
149
  type: "file",
149
150
  ref_key: "fileInput",
150
- ref: v,
151
+ ref: f,
151
152
  class: "hidden",
152
- onChange: _
153
- }, null, 40, $)) : d("", !0)
153
+ onChange: w
154
+ }, null, 40, V)) : m("", !0)
154
155
  ]),
155
156
  _: 3
156
157
  }, 8, ["type", "value", "disabled", "class"]);
157
158
  };
158
159
  }
159
- }), ae = /* @__PURE__ */ K(j, [["__scopeId", "data-v-39e952b8"]]);
160
+ }), J = /* @__PURE__ */ W(Y, [["__scopeId", "data-v-7e65a1ef"]]);
160
161
  export {
161
- ae as B
162
+ J as B
162
163
  };
package/dist/Button.css CHANGED
@@ -1 +1 @@
1
- .transparent-hover[data-v-39e952b8]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
1
+ .transparent-hover[data-v-7e65a1ef]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
package/dist/Button.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as r } from "./Button-COkapD0v.js";
2
- import { p } from "./plugin-CBhgqomZ.js";
1
+ import { B as r } from "./Button-CAiIEdkK.js";
2
+ import { p } from "./plugin-DcWjzc_X.js";
3
3
  export {
4
4
  r as Button,
5
5
  p as ButtonPlugin
package/dist/Dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-Bt-imwu7.js";
2
- import { p as a } from "./plugin-BwRXtPzh.js";
1
+ import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-pjG__bX2.js";
2
+ import { p as a } from "./plugin-CNqL90UL.js";
3
3
  export {
4
4
  p as Dropdown,
5
5
  a as DropdownPlugin
@@ -75,7 +75,7 @@ const j = /* @__PURE__ */ U("span", null, "Loading...", -1), q = ["aria-selected
75
75
  ref_key: "listRef",
76
76
  ref: y,
77
77
  role: "listbox",
78
- class: u(["text-left max-h-60 min-w-[12rem] z-10 overflow-y-auto scrollbar select-none floatable", [s.wrapperRoundnessClass, s.wrapperPaddingClass]]),
78
+ class: u(["text-left max-h-60 min-w-[12rem] z-10 overflow-y-auto scrollbar select-none floatable w-full", [s.wrapperRoundnessClass, s.wrapperPaddingClass]]),
79
79
  onScrollend: M,
80
80
  onMousemove: t[0] || (t[0] = () => f.value = "mouse"),
81
81
  onKeydown: D
package/dist/Icon.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as n } from "./Icon.vue_vue_type_script_setup_true_lang-CNUyv7CY.js";
2
- import { p as a } from "./plugin-BriPeDzu.js";
1
+ import { _ as n } from "./Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js";
2
+ import { p as a } from "./plugin-Dk3KBChD.js";
3
3
  export {
4
4
  n as Icon,
5
5
  a as IconPlugin
@@ -0,0 +1,45 @@
1
+ import { defineComponent as u, ref as m, computed as p, watch as f, openBlock as h, createElementBlock as d, normalizeClass as k, unref as t, normalizeStyle as w } from "vue";
2
+ import { a as o } from "./ui-BC6H9E93.js";
3
+ const b = (n, i) => {
4
+ const s = n[i];
5
+ return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((r, e) => {
6
+ (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(e.bind(null, new Error("Unknown variable dynamic import: " + i)));
7
+ });
8
+ }, y = ["innerHTML", "role"], _ = /* @__PURE__ */ u({
9
+ name: "TIcon",
10
+ __name: "Icon",
11
+ props: {
12
+ icon: {},
13
+ role: { default: "" },
14
+ size: { default: o.Default }
15
+ },
16
+ setup(n, { expose: i }) {
17
+ const s = n, r = m(""), e = m(null), g = p(() => s.role === "button"), v = p(() => s.role !== "" ? s.role : ""), l = async () => (await b(/* @__PURE__ */ Object.assign({ "../../assets/icons/account.svg": () => import("./account-BJGxzbeL.js"), "../../assets/icons/alert-octagon-outline.svg": () => import("./alert-octagon-outline-fM2QVbyq.js"), "../../assets/icons/alert-octagon.svg": () => import("./alert-octagon-BIUtdQBd.js"), "../../assets/icons/archive-outline.svg": () => import("./archive-outline-BT6uCRX5.js"), "../../assets/icons/archive.svg": () => import("./archive-DDuuzVUo.js"), "../../assets/icons/arrow-left.svg": () => import("./arrow-left-CVipcGWo.js"), "../../assets/icons/arrow-right.svg": () => import("./arrow-right-DHFo5L72.js"), "../../assets/icons/bank-outline.svg": () => import("./bank-outline-wy0O9ni0.js"), "../../assets/icons/bank.svg": () => import("./bank-lwoR1P6d.js"), "../../assets/icons/camera.svg": () => import("./camera-BXoPauop.js"), "../../assets/icons/cards-outline.svg": () => import("./cards-outline-B0no8Z63.js"), "../../assets/icons/cards-variant.svg": () => import("./cards-variant-CU6V8mdM.js"), "../../assets/icons/cart-outline.svg": () => import("./cart-outline-C99s8OpS.js"), "../../assets/icons/chart-box-outline.svg": () => import("./chart-box-outline-C9ymwfIH.js"), "../../assets/icons/chart-box.svg": () => import("./chart-box-tyepg_QH.js"), "../../assets/icons/check-circle-outline.svg": () => import("./check-circle-outline-B4zmPfuc.js"), "../../assets/icons/check-circle.svg": () => import("./check-circle-C3Kf7DnE.js"), "../../assets/icons/check.svg": () => import("./check-iUT-FuWa.js"), "../../assets/icons/checkbox-dark.svg": () => import("./checkbox-dark-D_btgwCX.js"), "../../assets/icons/checkbox-indeterminate-dark.svg": () => import("./checkbox-indeterminate-dark-CSrkJBRG.js"), "../../assets/icons/checkbox-indeterminate.svg": () => import("./checkbox-indeterminate-CtbmyFkw.js"), "../../assets/icons/checkbox.svg": () => import("./checkbox-TojXdFTq.js"), "../../assets/icons/chevron-down.svg": () => import("./chevron-down-CJLshITY.js"), "../../assets/icons/chevron-left.svg": () => import("./chevron-left-n_sGCmlG.js"), "../../assets/icons/chevron-right.svg": () => import("./chevron-right-C8uLqjmq.js"), "../../assets/icons/chevron-up.svg": () => import("./chevron-up-b6VdQM8S.js"), "../../assets/icons/circle.svg": () => import("./circle-DhoEDuC5.js"), "../../assets/icons/clock.svg": () => import("./clock-BqMI2OIG.js"), "../../assets/icons/close-circle-outline.svg": () => import("./close-circle-outline-CUXfYV4M.js"), "../../assets/icons/close-circle.svg": () => import("./close-circle-Bvyw4JKW.js"), "../../assets/icons/close.svg": () => import("./close-DemH4JAO.js"), "../../assets/icons/cog.svg": () => import("./cog-Dd9I6z5D.js"), "../../assets/icons/color-fill.svg": () => import("./color-fill-DWx77G0p.js"), "../../assets/icons/copy.svg": () => import("./copy-D-Dqxp8h.js"), "../../assets/icons/credit-card-plus.svg": () => import("./credit-card-plus-TUZq5Zi0.js"), "../../assets/icons/credit-card.svg": () => import("./credit-card-B3VjoUad.js"), "../../assets/icons/currency.svg": () => import("./currency-BuSji4qA.js"), "../../assets/icons/database.svg": () => import("./database-CNG_l2Or.js"), "../../assets/icons/dots-grid.svg": () => import("./dots-grid-BhRGZg1t.js"), "../../assets/icons/dots-vertical.svg": () => import("./dots-vertical-nYIDxlT1.js"), "../../assets/icons/email-open-outline.svg": () => import("./email-open-outline-NlRAK8vu.js"), "../../assets/icons/email-outline.svg": () => import("./email-outline-v-beMKo_.js"), "../../assets/icons/eye-off.svg": () => import("./eye-off-Dq2WOPSG.js"), "../../assets/icons/eye.svg": () => import("./eye-C7_UM0rn.js"), "../../assets/icons/file-document-plus-outline.svg": () => import("./file-document-plus-outline-C_GeG8ak.js"), "../../assets/icons/filmstrip.svg": () => import("./filmstrip-Dg66xHap.js"), "../../assets/icons/filter.svg": () => import("./filter-07gM0IrM.js"), "../../assets/icons/fullscreen-exit.svg": () => import("./fullscreen-exit-DvHy2f8E.js"), "../../assets/icons/fullscreen.svg": () => import("./fullscreen-daZRwm-1.js"), "../../assets/icons/group.svg": () => import("./group-B1HQcmCl.js"), "../../assets/icons/image-album-outline.svg": () => import("./image-album-outline-oiPipPnp.js"), "../../assets/icons/image-album.svg": () => import("./image-album-DVl72ioK.js"), "../../assets/icons/image-outline.svg": () => import("./image-outline-CLpFyr7w.js"), "../../assets/icons/image.svg": () => import("./image-C-DY_SfK.js"), "../../assets/icons/info-outline.svg": () => import("./info-outline-Mn6Hjz_K.js"), "../../assets/icons/key-chain.svg": () => import("./key-chain-D-8-GrU2.js"), "../../assets/icons/key-variant.svg": () => import("./key-variant-DViBRFAJ.js"), "../../assets/icons/key.svg": () => import("./key-B8iEXxGx.js"), "../../assets/icons/listbox-outline.svg": () => import("./listbox-outline-BBriTS-r.js"), "../../assets/icons/loading.svg": () => import("./loading-E4eFmVsP.js"), "../../assets/icons/lock-outline.svg": () => import("./lock-outline-K2LxC2b6.js"), "../../assets/icons/lock.svg": () => import("./lock-Nv-e-b24.js"), "../../assets/icons/logout.svg": () => import("./logout-BHwFpuou.js"), "../../assets/icons/menu-down.svg": () => import("./menu-down-B4Fy5IG1.js"), "../../assets/icons/menu-left.svg": () => import("./menu-left-D8G3frKt.js"), "../../assets/icons/menu-right.svg": () => import("./menu-right-CMt4thJ2.js"), "../../assets/icons/menu.svg": () => import("./menu-pq7WWaJu.js"), "../../assets/icons/minus-circle-outline.svg": () => import("./minus-circle-outline-B-x6EXPD.js"), "../../assets/icons/minus-circle.svg": () => import("./minus-circle-D_N5NZW-.js"), "../../assets/icons/minus.svg": () => import("./minus-CSCkQnOm.js"), "../../assets/icons/moon.svg": () => import("./moon-Bhm_ZTV6.js"), "../../assets/icons/open-in-new.svg": () => import("./open-in-new-C2Btl_1k.js"), "../../assets/icons/pencil.svg": () => import("./pencil-BETebgXX.js"), "../../assets/icons/people.svg": () => import("./people-BUW1DRzH.js"), "../../assets/icons/piggy-bank-outline.svg": () => import("./piggy-bank-outline-5cDQNrSU.js"), "../../assets/icons/plus-circle-outline.svg": () => import("./plus-circle-outline-C-kkX0ke.js"), "../../assets/icons/plus-circle.svg": () => import("./plus-circle-Cl0YprEp.js"), "../../assets/icons/plus.svg": () => import("./plus-sbcOm60H.js"), "../../assets/icons/qrcode-scan.svg": () => import("./qrcode-scan-CpLrVFw_.js"), "../../assets/icons/radio-dark.svg": () => import("./radio-dark-Cr5v17AF.js"), "../../assets/icons/radio.svg": () => import("./radio-DkjVAhsO.js"), "../../assets/icons/refresh.svg": () => import("./refresh-DPlMWd1M.js"), "../../assets/icons/save.svg": () => import("./save-BmMH4S8b.js"), "../../assets/icons/search.svg": () => import("./search-Co2MwWOK.js"), "../../assets/icons/spotlight.svg": () => import("./spotlight-TNyCQzOY.js"), "../../assets/icons/store-outline.svg": () => import("./store-outline-B-fuVZzv.js"), "../../assets/icons/sun.svg": () => import("./sun-BWKjCEHH.js"), "../../assets/icons/swap-horizontal.svg": () => import("./swap-horizontal-DociZUG2.js"), "../../assets/icons/swap-left.svg": () => import("./swap-left-Bd2DOgf3.js"), "../../assets/icons/swap-right.svg": () => import("./swap-right-D0VYxBDb.js"), "../../assets/icons/swap.svg": () => import("./swap-CNbqKTl0.js"), "../../assets/icons/system-theme.svg": () => import("./system-theme-Cez6mSv_.js"), "../../assets/icons/tag-outline.svg": () => import("./tag-outline-Ce_qOxif.js"), "../../assets/icons/trash-can-outline.svg": () => import("./trash-can-outline-DjtqZHOC.js"), "../../assets/icons/trash-can.svg": () => import("./trash-can-CKPtMqSf.js"), "../../assets/icons/upload.svg": () => import("./upload-CKfrBexU.js"), "../../assets/icons/user-circle.svg": () => import("./user-circle-D102n1FB.js"), "../../assets/icons/zip-box.svg": () => import("./zip-box-C10560VY.js") }), `../../assets/icons/${s.icon}.svg`)).default;
18
+ return f(
19
+ () => s.icon,
20
+ async (c, a) => {
21
+ c !== a && (r.value = await l());
22
+ },
23
+ { immediate: !0 }
24
+ ), i({ reference: e }), (c, a) => (h(), d("i", {
25
+ innerHTML: r.value,
26
+ ref_key: "reference",
27
+ ref: e,
28
+ class: k(["inline-block fill-current", {
29
+ "w-3 h-3": s.size === t(o).ExtraSmall,
30
+ "w-5 h-5": s.size === t(o).Small,
31
+ "w-6 h-6": s.size === t(o).Default,
32
+ "w-12 h-12": s.size === t(o).Large,
33
+ "w-16 h-16": s.size === t(o).ExtraLarge,
34
+ "cursor-pointer": g.value
35
+ }]),
36
+ style: w(
37
+ typeof s.size == "number" ? `width: ${s.size}px; height: ${s.size}px;` : ""
38
+ ),
39
+ role: v.value
40
+ }, null, 14, y));
41
+ }
42
+ });
43
+ export {
44
+ _
45
+ };
@@ -1,5 +1,5 @@
1
- import { _ as e } from "./InputCheckbox.vue_vue_type_script_setup_true_lang-DUczNK1m.js";
2
- import { p as t } from "./plugin-B97SpnhW.js";
1
+ import { _ as e } from "./InputCheckbox.vue_vue_type_script_setup_true_lang-Bh8HA3Ay.js";
2
+ import { p as t } from "./plugin-DLkeyKDM.js";
3
3
  export {
4
4
  e as InputCheckbox,
5
5
  t as InputCheckboxPlugin
@@ -10,25 +10,25 @@ const B = ["indeterminate", "id", "disabled"], I = /* @__PURE__ */ p({
10
10
  },
11
11
  emits: ["update:model-value", "input"],
12
12
  setup(o, { emit: l }) {
13
- const i = o, a = l, r = s("id", ""), t = c(!1), d = () => {
13
+ const a = o, i = l, d = s("id", ""), t = c(!1), r = () => {
14
14
  const e = !t.value;
15
- a("update:model-value", e), a("input", e);
15
+ i("update:model-value", e), i("input", e);
16
16
  };
17
17
  return m(
18
- () => i.modelValue,
18
+ () => a.modelValue,
19
19
  (e) => {
20
- i.initializeValue && typeof e > "u" && a("update:model-value", !1), t.value = e;
20
+ a.initializeValue && typeof e > "u" && i("update:model-value", !1), t.value = e;
21
21
  },
22
22
  { immediate: !0 }
23
23
  ), (e, n) => f((b(), v("input", h({
24
24
  "onUpdate:modelValue": n[0] || (n[0] = (u) => t.value = u)
25
25
  }, e.$attrs, {
26
26
  type: "checkbox",
27
- class: "form-checkbox relative w-5 h-5 border input-border input-roundness color-caipira-primary-inverted bg-caipira-primary checked:bg-caipira-primary-inverted cursor-pointer input-outline",
28
- indeterminate: i.isIndeterminate,
29
- id: k(r),
27
+ class: "form-checkbox w-5 h-5 border input-border input-roundness color-caipira-primary-inverted bg-caipira-primary checked:bg-caipira-primary-inverted input-outline",
28
+ indeterminate: a.isIndeterminate,
29
+ id: k(d),
30
30
  disabled: e.disabled,
31
- onInput: d
31
+ onInput: r
32
32
  }), null, 16, B)), [
33
33
  [y, t.value]
34
34
  ]);
package/dist/InputDate.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as a } from "./InputDate.vue_vue_type_script_setup_true_lang-Do47MTJJ.js";
2
- import { p as o } from "./plugin-Dy14_LJS.js";
1
+ import { _ as a } from "./InputDate.vue_vue_type_script_setup_true_lang-BAgG9zPV.js";
2
+ import { p as o } from "./plugin-BtF6kCcf.js";
3
3
  export {
4
4
  a as InputDate,
5
5
  o as InputDatePlugin
@@ -0,0 +1,188 @@
1
+ import { defineComponent as J, ref as x, watch as S, computed as Y, onBeforeMount as Q, resolveComponent as B, openBlock as v, createBlock as X, withCtx as I, createElementVNode as a, withKeys as K, toDisplayString as M, unref as Z, createElementBlock as m, Fragment as $, renderList as F, normalizeClass as T, createVNode as N } from "vue";
2
+ import { f as j } from "./index-CjvqeRf7.js";
3
+ import { g as A, s as D, a as ee, b as E, c as te } from "./index-CuyePt3m.js";
4
+ const oe = ["value"], le = {
5
+ class: "p-4 select-none floatable input-roundness",
6
+ style: { width: "17rem" }
7
+ }, ne = { class: "flex justify-between items-center mb-2" }, ae = { class: "text-lg font-bold" }, se = ["value", "selected"], re = ["disabled"], ue = ["disabled"], ie = { class: "flex flex-wrap mb-3 -mx-1" }, de = { class: "font-medium text-center text-xs" }, ce = { class: "flex flex-wrap -mx-1" }, ve = ["onClick"], k = !0, he = /* @__PURE__ */ J({
8
+ name: "TInputDate",
9
+ __name: "InputDate",
10
+ props: {
11
+ value: {},
12
+ modelValue: {},
13
+ initialValue: {}
14
+ },
15
+ emits: ["update:model-value"],
16
+ setup(L, { emit: O }) {
17
+ const V = O, u = x(!1), s = L, f = /* @__PURE__ */ new Date(), P = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], e = x(/* @__PURE__ */ new Date()), r = x(e.value.getFullYear()), p = x(e.value.getMonth());
18
+ S(
19
+ () => e.value,
20
+ (o) => {
21
+ p.value = o.getMonth(), r.value = o.getFullYear();
22
+ },
23
+ { immediate: !0 }
24
+ );
25
+ let h, y, g;
26
+ S(
27
+ () => s.modelValue,
28
+ () => {
29
+ if (s.modelValue)
30
+ switch (typeof s.modelValue) {
31
+ case "string":
32
+ const o = new Date(s.modelValue);
33
+ o && V("update:model-value", o);
34
+ break;
35
+ case "object":
36
+ e.value = s.modelValue, h = e.value.getDate(), y = e.value.getFullYear(), g = e.value.getMonth();
37
+ break;
38
+ }
39
+ },
40
+ { immediate: !0 }
41
+ );
42
+ const W = Y(() => {
43
+ if (!s.modelValue)
44
+ return "";
45
+ const o = typeof s.modelValue == "string" ? new Date(s.modelValue) : s.modelValue;
46
+ return j(o, "yyyy-MM-dd");
47
+ }), z = Y(() => {
48
+ const o = f.getFullYear();
49
+ return Array.from({ length: 49 }, (n, i) => o - 1 - i).reverse().concat(Array.from({ length: 51 }, (n, i) => o + i));
50
+ }), G = (o) => e.value = ee(
51
+ e.value,
52
+ o?.target?.value
53
+ ), R = (o) => {
54
+ o.overflow && (e.value = o.overflow > 0 ? E(e.value, o.overflow) : D(e.value, ~o.overflow + 1)), e.value = te(e.value, o.day), V("update:model-value", e.value), u.value = !1;
55
+ }, U = () => {
56
+ e.value = D(e.value, 1);
57
+ }, q = () => {
58
+ e.value = E(e.value, 1);
59
+ }, H = Y(() => {
60
+ const n = [], i = new Date(r.value, p.value).getDay(), b = A(D(e.value, 1)), t = A(e.value), _ = f.getDate(), C = f.getFullYear(), c = f.getMonth();
61
+ let w = 1, d = p.value - 1;
62
+ for (let l = b - (i - 1); l <= b; l++)
63
+ n.push({
64
+ key: `${l}-${c - 1}`,
65
+ day: l,
66
+ isToday: _ === l && c === d && C === r.value,
67
+ selected: h === l && g === d && y === r.value,
68
+ overflow: -1
69
+ }), w++;
70
+ d = p.value;
71
+ for (let l = 1; l <= t; l++)
72
+ n.push({
73
+ key: `${l}-${c}`,
74
+ day: l,
75
+ isToday: _ === l && c === d && C === r.value,
76
+ selected: h === l && g === d && y === r.value,
77
+ overflow: 0
78
+ }), w++;
79
+ d = p.value + 1;
80
+ for (let l = 1; w <= 42; l++)
81
+ n.push({
82
+ key: `${l}-${c + 1}`,
83
+ day: l,
84
+ isToday: _ === l && c === d && C === r.value,
85
+ selected: h === l && g === d && y === r.value,
86
+ overflow: 1
87
+ }), w++;
88
+ return n;
89
+ });
90
+ return Q(() => {
91
+ !s.modelValue && s.initialValue && V("update:model-value", s.initialValue);
92
+ }), (o, n) => {
93
+ const i = B("t-icon"), b = B("t-popover");
94
+ return v(), X(b, {
95
+ open: u.value,
96
+ "onUpdate:open": n[3] || (n[3] = (t) => u.value = t),
97
+ placement: "bottom-start",
98
+ class: "w-full",
99
+ width: "static",
100
+ ref: "popoverRef"
101
+ }, {
102
+ default: I(() => [
103
+ a("input", {
104
+ type: "text",
105
+ readonly: "",
106
+ value: W.value,
107
+ class: "w-full pl-2 pr-10 py-2 leading-none input-bg-color input-text-color border input-border input-roundness input-outline",
108
+ placeholder: "Select date",
109
+ onKeydown: n[0] || (n[0] = K((t) => u.value = !1, ["escape"])),
110
+ onKeyup: n[1] || (n[1] = K((t) => u.value = !u.value, ["space", "enter"])),
111
+ onClick: n[2] || (n[2] = (t) => u.value = !u.value)
112
+ }, null, 40, oe)
113
+ ]),
114
+ content: I(() => [
115
+ a("div", le, [
116
+ a("div", ne, [
117
+ a("div", null, [
118
+ a("span", ae, M(Z(j)(e.value, "MMMM")), 1),
119
+ a("select", {
120
+ class: "ml-2 text-lg input-bg-color border input-border input-outline",
121
+ onChange: G
122
+ }, [
123
+ (v(!0), m($, null, F(z.value, (t) => (v(), m("option", {
124
+ key: t,
125
+ value: t,
126
+ selected: t === r.value
127
+ }, M(t), 9, se))), 128))
128
+ ], 32)
129
+ ]),
130
+ a("div", null, [
131
+ a("button", {
132
+ type: "button",
133
+ class: T(["transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-hover p-1 rounded-full", {
134
+ "cursor-not-allowed opacity-25": !k
135
+ }]),
136
+ disabled: !k,
137
+ onClick: U
138
+ }, [
139
+ N(i, { icon: "chevron-left" })
140
+ ], 10, re),
141
+ a("button", {
142
+ type: "button",
143
+ class: T(["transition ease-in-out duration-100 inline-flex cursor-pointer p-1 rounded-full hover:bg-hover", {
144
+ "cursor-not-allowed opacity-25": !k
145
+ }]),
146
+ disabled: !k,
147
+ onClick: q
148
+ }, [
149
+ N(i, { icon: "chevron-right" })
150
+ ], 10, ue)
151
+ ])
152
+ ]),
153
+ a("div", ie, [
154
+ (v(), m($, null, F(P, (t) => a("div", {
155
+ key: t,
156
+ style: { width: "14.26%" },
157
+ class: "px-1"
158
+ }, [
159
+ a("div", de, M(t), 1)
160
+ ])), 64))
161
+ ]),
162
+ a("div", ce, [
163
+ (v(!0), m($, null, F(H.value, (t) => (v(), m("div", {
164
+ key: t.key,
165
+ style: { width: "14.28%" },
166
+ class: "px-1 mb-1"
167
+ }, [
168
+ a("div", {
169
+ onClick: (_) => R(t),
170
+ class: T(["cursor-pointer text-center text-sm rounded leading-loose transition ease-in-out duration-100", {
171
+ "hover:bg-hover": !t.selected,
172
+ "color-unfocused-text": t.overflow !== 0,
173
+ "border border-caipira-primary-inverted": t.isToday,
174
+ "color-caipira-primary bg-caipira-primary-inverted": t.selected
175
+ }])
176
+ }, M(t.day), 11, ve)
177
+ ]))), 128))
178
+ ])
179
+ ])
180
+ ]),
181
+ _: 1
182
+ }, 8, ["open"]);
183
+ };
184
+ }
185
+ });
186
+ export {
187
+ he as _
188
+ };
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./InputPhone.vue_vue_type_script_setup_true_lang-DXtliNyv.js";
2
- import { p as r } from "./plugin-CGIfywdY.js";
1
+ import { _ as p } from "./InputPhone.vue_vue_type_script_setup_true_lang-B4TULqLW.js";
2
+ import { p as r } from "./plugin-CrHDShgh.js";
3
3
  export {
4
4
  p as InputPhone,
5
5
  r as InputPhonePlugin