@caipira/tamandua 0.0.108 → 0.0.109

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.
package/dist/Dropdown.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-CSTzXt4q.js";
2
- import { p as a } from "./plugin-CY8npg4V.js";
1
+ import { _ as p } from "./Dropdown.vue_vue_type_script_setup_true_lang-DnHuJMcD.js";
2
+ import { p as a } from "./plugin-CI_-9tD3.js";
3
3
  export {
4
4
  p as Dropdown,
5
5
  a as DropdownPlugin
@@ -38,34 +38,34 @@ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected
38
38
  default:
39
39
  return "text-base";
40
40
  }
41
- }), b = async (t = i.value, o = s.items[t], l = void 0) => {
42
- l?.stopPropagation(), o.action && await o.action(), R("change", {
43
- index: t,
44
- option: o,
41
+ }), b = async (o = i.value, t = s.items[o], l = void 0) => {
42
+ l?.stopPropagation(), t?.action && typeof t.action == "function" && (typeof t?.manual > "u" || t.manual === !1) && await t.action(), R("change", {
43
+ index: o,
44
+ option: t,
45
45
  hold: l?.ctrlKey ?? !1
46
46
  });
47
- }, M = (t) => {
47
+ }, M = (o) => {
48
48
  if (!s.isVisible)
49
49
  return !1;
50
- switch (t.preventDefault(), p.value = "keyboard", t.key) {
50
+ switch (o.preventDefault(), p.value = "keyboard", o.key) {
51
51
  case "ArrowUp":
52
52
  case "ArrowDown":
53
- return S(t);
53
+ return S(o);
54
54
  case "Enter":
55
55
  return b();
56
56
  }
57
57
  }, N = () => {
58
- const t = C.value;
59
- t.scrollTop = 0;
60
- }, S = (t) => {
61
- const o = t.key === "ArrowDown", l = s.items.length;
58
+ const o = C.value;
59
+ o.scrollTop = 0;
60
+ }, S = (o) => {
61
+ const t = o.key === "ArrowDown", l = s.items.length;
62
62
  let e = i.value;
63
63
  const a = () => s.items[e] ? "isGroupLabel" in s.items[e] && s.items[e].isGroupLabel : !1, g = () => {
64
64
  e === l - 1 ? e = 0 : e++;
65
65
  }, K = () => {
66
66
  e === 0 ? e = l - 1 : e--;
67
67
  };
68
- if (o)
68
+ if (t)
69
69
  do
70
70
  g();
71
71
  while (a());
@@ -78,18 +78,18 @@ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected
78
78
  let w = 0;
79
79
  if (_.focus(), v === 0 || u === 0)
80
80
  w = v - z + h;
81
- else if (o && v + h > z + u)
81
+ else if (t && v + h > z + u)
82
82
  w = u + h;
83
- else if (!o && v < u)
83
+ else if (!t && v < u)
84
84
  w = u - h;
85
85
  else
86
86
  return !0;
87
87
  return x.scroll({ top: w }), !0;
88
- }, T = (t) => {
89
- const o = t.target, l = f.value[0];
90
- !o || !l || o.scrollTop + o.clientHeight + l.offsetHeight >= o.scrollHeight && R("end-reached");
88
+ }, T = (o) => {
89
+ const t = o.target, l = f.value[0];
90
+ !t || !l || t.scrollTop + t.clientHeight + l.offsetHeight >= t.scrollHeight && R("end-reached");
91
91
  };
92
- return B({ move: S, resetScroll: N }), (t, o) => {
92
+ return B({ move: S, resetScroll: N }), (o, t) => {
93
93
  const l = E("t-icon");
94
94
  return n(), r("ul", {
95
95
  ref_key: "listRef",
@@ -97,7 +97,7 @@ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected
97
97
  role: "listbox",
98
98
  class: c(["text-left max-h-60 min-w-fit z-10 overflow-y-auto scrollbar select-none floatable w-full", [s.wrapperRoundnessClass, s.wrapperPaddingClass]]),
99
99
  onScrollend: T,
100
- onMousemove: o[0] || (o[0] = () => p.value = "mouse"),
100
+ onMousemove: t[0] || (t[0] = () => p.value = "mouse"),
101
101
  onKeydown: M
102
102
  }, [
103
103
  s.loading ? (n(), r("li", {
@@ -117,7 +117,7 @@ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected
117
117
  icon: "loading"
118
118
  }),
119
119
  W
120
- ], 2)) : t.items.length === 0 ? (n(), r("li", {
120
+ ], 2)) : o.items.length === 0 ? (n(), r("li", {
121
121
  key: 1,
122
122
  role: "option",
123
123
  "aria-disabled": "true",
@@ -127,7 +127,7 @@ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected
127
127
  [s.optionMarginClass],
128
128
  [s.optionRoundnessClass]
129
129
  ]])
130
- }, " Nothing here ", 2)) : (n(!0), r(D, { key: 2 }, F(t.items, (e, a) => (n(), r(D, {
130
+ }, " Nothing here ", 2)) : (n(!0), r(D, { key: 2 }, F(o.items, (e, a) => (n(), r(D, {
131
131
  key: e?.isGroupLabel ? a : e.value
132
132
  }, [
133
133
  e.isGroupLabel ? (n(), r("li", {
@@ -159,7 +159,7 @@ const W = /* @__PURE__ */ Q("span", null, "Loading...", -1), X = ["aria-selected
159
159
  onKeydown: $((g) => b(a, e), ["enter"]),
160
160
  onClick: (g) => b(a, e, g)
161
161
  }, [
162
- t.$slots.default ? I(t.$slots, "default", O(U({ key: 0 }, e))) : (n(), r("div", Y, [
162
+ o.$slots.default ? I(o.$slots, "default", O(U({ key: 0 }, e))) : (n(), r("div", Y, [
163
163
  e.icon ? (n(), j(l, {
164
164
  key: 0,
165
165
  icon: e.icon,
@@ -6,7 +6,7 @@ import { _ as n } from "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js"
6
6
  import { _ as u } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-CLi_IXfP.js";
7
7
  import { _ as l } from "./DialogProvider.vue_vue_type_script_setup_true_lang-ByNINsSh.js";
8
8
  import { D as c } from "./Drawer-y5xBARd2.js";
9
- import { _ as T } from "./Dropdown.vue_vue_type_script_setup_true_lang-CSTzXt4q.js";
9
+ import { _ as T } from "./Dropdown.vue_vue_type_script_setup_true_lang-DnHuJMcD.js";
10
10
  import { _ as d } from "./FileDrop.vue_vue_type_script_setup_true_lang-Bq0lAgZ7.js";
11
11
  import { _ as D } from "./Form.vue_vue_type_script_setup_true_lang-DDfFG5ov.js";
12
12
  import { _ as g } from "./FormItem.vue_vue_type_script_setup_true_lang-C4UxWB8-.js";
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./Dropdown.vue_vue_type_script_setup_true_lang-CSTzXt4q.js";
2
+ import { _ as s } from "./Dropdown.vue_vue_type_script_setup_true_lang-DnHuJMcD.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -13,8 +13,8 @@ import "./useDialog-jyWJVydI.js";
13
13
  import { p as t } from "./plugin-ndofoJoM.js";
14
14
  import "./Drawer-y5xBARd2.js";
15
15
  import { p as u } from "./plugin-JMSzJgz5.js";
16
- import "./Dropdown.vue_vue_type_script_setup_true_lang-CSTzXt4q.js";
17
- import { p as l } from "./plugin-CY8npg4V.js";
16
+ import "./Dropdown.vue_vue_type_script_setup_true_lang-DnHuJMcD.js";
17
+ import { p as l } from "./plugin-CI_-9tD3.js";
18
18
  import { p as g } from "./plugin-43q0Kzto.js";
19
19
  import { p as a } from "./plugin-DHpk9u10.js";
20
20
  import "./Form.vue_vue_type_script_setup_true_lang-DDfFG5ov.js";
package/dist/plugins.js CHANGED
@@ -13,8 +13,8 @@ import "./useDialog-jyWJVydI.js";
13
13
  import { p as j } from "./plugin-ndofoJoM.js";
14
14
  import "./Drawer-y5xBARd2.js";
15
15
  import { p as z } from "./plugin-JMSzJgz5.js";
16
- import "./Dropdown.vue_vue_type_script_setup_true_lang-CSTzXt4q.js";
17
- import { p as J } from "./plugin-CY8npg4V.js";
16
+ import "./Dropdown.vue_vue_type_script_setup_true_lang-DnHuJMcD.js";
17
+ import { p as J } from "./plugin-CI_-9tD3.js";
18
18
  import { p as N } from "./plugin-43q0Kzto.js";
19
19
  import { p as Q } from "./plugin-DHpk9u10.js";
20
20
  import "./Form.vue_vue_type_script_setup_true_lang-DDfFG5ov.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-CKVBk6Nv.js";
1
+ import { p as n } from "./plugins-W2r35mIp.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
@@ -46,6 +46,7 @@ declare function __VLS_template(): {
46
46
  items: unknown[];
47
47
  pagination: import('../../index.js').Pagination;
48
48
  }> | Promise<void> | void;
49
+ manual?: boolean;
49
50
  value?: never;
50
51
  isGroupLabel?: never;
51
52
  }): any;
@@ -47,6 +47,7 @@ declare function __VLS_template(): {
47
47
  items: unknown[];
48
48
  pagination: Pagination;
49
49
  }> | Promise<void> | void;
50
+ manual?: boolean | undefined;
50
51
  value?: never | undefined;
51
52
  isGroupLabel?: never | undefined;
52
53
  }): any;
@@ -46,6 +46,9 @@ export type InputSelectOption = {
46
46
  items: unknown[];
47
47
  pagination: Pagination;
48
48
  }> | Promise<void> | void;
49
+ /** If false, the action will not be executed immediately after
50
+ selection. Default false. */
51
+ manual?: boolean;
49
52
  value?: never;
50
53
  isGroupLabel?: never;
51
54
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.108",
3
+ "version": "0.0.109",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",