@caipira/tamandua 0.0.31 → 0.0.33
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/README.md +12 -4
- package/dist/ChartTreemap.js +2 -2
- package/dist/{ChartTreemap.vue_vue_type_script_setup_true_lang-CG5aK3KH.js → ChartTreemap.vue_vue_type_script_setup_true_lang-DzIPutlk.js} +3 -1
- package/dist/InputCheckbox.js +2 -2
- package/dist/{InputCheckbox.vue_vue_type_script_setup_true_lang-DUczNK1m.js → InputCheckbox.vue_vue_type_script_setup_true_lang-Bh8HA3Ay.js} +8 -8
- package/dist/InputDate.js +2 -2
- package/dist/InputDate.vue_vue_type_script_setup_true_lang-BAgG9zPV.js +188 -0
- package/dist/InputPassword.js +2 -2
- package/dist/InputPassword.vue_vue_type_script_setup_true_lang-DtP-Tv-2.js +167 -0
- package/dist/InputRadio.js +2 -2
- package/dist/{InputRadio.vue_vue_type_script_setup_true_lang-Dqbov2kN.js → InputRadio.vue_vue_type_script_setup_true_lang-Cu7lzDAh.js} +7 -7
- package/dist/Popover.js +2 -2
- package/dist/{Popover.vue_vue_type_script_setup_true_lang-65AAXNvQ.js → Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js} +14 -11
- package/dist/{Table-COkg498M.js → Table-C0Sr_Lfm.js} +2 -2
- package/dist/Table.css +1 -1
- package/dist/Table.js +2 -2
- package/dist/Tag.js +2 -2
- package/dist/{Tag.vue_vue_type_script_setup_true_lang-CgX-nT8V.js → Tag.vue_vue_type_script_setup_true_lang-DMigzW22.js} +16 -19
- package/dist/components.js +8 -8
- package/dist/index.css +1 -0
- package/dist/{plugin-DOiXH9p9.js → plugin-BN2jubTY.js} +1 -1
- package/dist/{plugin-VtriDxZB.js → plugin-Bog7k3Qf.js} +1 -1
- package/dist/{plugin-CN6om3My.js → plugin-BtF6kCcf.js} +1 -1
- package/dist/{plugin-B2fe1hFi.js → plugin-CTMcmMdr.js} +1 -1
- package/dist/{plugin--NhgQEQ9.js → plugin-CdJ1wBq2.js} +1 -1
- package/dist/{plugin-BibUAa04.js → plugin-D4x3uASg.js} +1 -1
- package/dist/{plugin-B97SpnhW.js → plugin-DLkeyKDM.js} +1 -1
- package/dist/{plugin-D8CsjFdw.js → plugin-DgCa2m12.js} +1 -1
- package/dist/{plugins-ph4w98yE.js → plugins-BA8tojIo.js} +11 -11
- package/dist/plugins.js +11 -11
- package/dist/tamandua.js +1 -1
- package/dist/types/components/Popover/Popover.vue.d.ts +9 -0
- package/dist/types/components/Popover/types.d.ts +7 -0
- package/dist/types/enums/form.d.ts +3 -3
- package/dist/types/enums/ui.d.ts +10 -10
- package/dist/types/services/password.d.ts +1 -4
- package/dist/types/services/password.test.d.ts +1 -0
- package/package.json +3 -4
- package/dist/InputDate.vue_vue_type_script_setup_true_lang-D6nd7-IJ.js +0 -188
- package/dist/InputPassword.vue_vue_type_script_setup_true_lang-Do7d1Qfe.js +0 -172
- /package/dist/types/components/Form/{Form.spec.d.ts → Form.test.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -20,7 +20,15 @@ npx vite-bundle-visualizer
|
|
|
20
20
|
|
|
21
21
|
## Reference
|
|
22
22
|
|
|
23
|
-
[
|
|
24
|
-
[
|
|
25
|
-
[
|
|
26
|
-
[
|
|
23
|
+
[typescript](https://www.typescriptlang.org/docs)
|
|
24
|
+
[vuejs](https://v3.vuejs.org)
|
|
25
|
+
[vite](https://vitejs.dev)
|
|
26
|
+
[tailwind-css](https://tailwindcss.com)
|
|
27
|
+
[tamanduá](https://github.com/caipira-io/tamandua)
|
|
28
|
+
[storybook](https://storybook.js.org/docs/get-started/vue3-vite)
|
|
29
|
+
[floating-ui](https://floating-ui.com/docs/vue)
|
|
30
|
+
[gsap](https://gsap.com/docs/v3/GSAP)
|
|
31
|
+
[d3](https://d3js.org/getting-started)
|
|
32
|
+
[vue-i18n](https://kazupon.github.io/vue-i18n)
|
|
33
|
+
[date-fns](https://date-fns.org/v2.24.0/docs)
|
|
34
|
+
[fakerjs](https://next.fakerjs.dev/api)
|
package/dist/ChartTreemap.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as m } from "./plugin-
|
|
1
|
+
import { _ as e } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-DzIPutlk.js";
|
|
2
|
+
import { p as m } from "./plugin-D4x3uASg.js";
|
|
3
3
|
export {
|
|
4
4
|
e as ChartTreemap,
|
|
5
5
|
m as ChartTreemapPlugin
|
|
@@ -256,7 +256,9 @@ const vt = /* @__PURE__ */ T({
|
|
|
256
256
|
const a = parseInt(
|
|
257
257
|
C(`div#${n}`).style("width"),
|
|
258
258
|
10
|
|
259
|
-
), o = { top: 0, right: 0, bottom: 0, left: 0 }, f = a, d = 350, s = f - o.left - o.right, m = d - o.top - o.bottom, u = C(`div#${n} svg`).attr("width", f).attr("height", d).append("g").attr("transform", `translate(${o.left},${o.top})`), v = M(e.data).sum((c) => c?.value ?? 0).sort(
|
|
259
|
+
), o = { top: 0, right: 0, bottom: 0, left: 0 }, f = a, d = 350, s = f - o.left - o.right, m = d - o.top - o.bottom, u = C(`div#${n} svg`).attr("width", f).attr("height", d).append("g").attr("transform", `translate(${o.left},${o.top})`), v = M(e.data).sum((c) => c?.value ?? 0).sort(
|
|
260
|
+
(c, h) => (h.value ?? 0) - (c.value ?? 0)
|
|
261
|
+
), l = ft().size([s, m]).padding(1)(v), g = ht;
|
|
260
262
|
u.selectAll("rect").data(l.leaves()).enter().append("rect").attr("x", (c) => c.x0).attr("y", (c) => c.y0).attr("width", (c) => c.x1 - c.x0).attr("height", (c) => c.y1 - c.y0).attr("fill", (c, h) => {
|
|
261
263
|
const p = c.parent?.data?.color;
|
|
262
264
|
if (p)
|
package/dist/InputCheckbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e } from "./InputCheckbox.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as t } from "./plugin-
|
|
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
|
|
13
|
+
const a = o, i = l, d = s("id", ""), t = c(!1), r = () => {
|
|
14
14
|
const e = !t.value;
|
|
15
|
-
|
|
15
|
+
i("update:model-value", e), i("input", e);
|
|
16
16
|
};
|
|
17
17
|
return m(
|
|
18
|
-
() =>
|
|
18
|
+
() => a.modelValue,
|
|
19
19
|
(e) => {
|
|
20
|
-
|
|
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
|
|
28
|
-
indeterminate:
|
|
29
|
-
id: k(
|
|
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:
|
|
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-
|
|
2
|
-
import { p as o } from "./plugin-
|
|
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
|
+
};
|
package/dist/InputPassword.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as a } from "./plugin-
|
|
1
|
+
import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-DtP-Tv-2.js";
|
|
2
|
+
import { p as a } from "./plugin-BN2jubTY.js";
|
|
3
3
|
export {
|
|
4
4
|
s as InputPassword,
|
|
5
5
|
a as InputPasswordPlugin
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { defineComponent as ee, mergeModels as z, useModel as te, ref as R, watch as le, resolveComponent as V, openBlock as S, createElementBlock as x, Fragment as ne, createElementVNode as j, normalizeClass as B, createVNode as k, unref as U, createCommentVNode as _, withKeys as oe, createBlock as se, toDisplayString as ae } from "vue";
|
|
2
|
+
import { u as re } from "./useClipboard-BHFD0Jvv.js";
|
|
3
|
+
import { f as ie } from "./index-CjvqeRf7.js";
|
|
4
|
+
const ue = (o = 18) => {
|
|
5
|
+
const e = "abcdefghkmnpqrstuvwxyzABCDEFGHKMNPQRSTUVWXYZ23456789", a = "!?@#-+<%$>[]{}";
|
|
6
|
+
let n = "";
|
|
7
|
+
const l = [
|
|
8
|
+
Math.floor(Math.random() * o),
|
|
9
|
+
Math.floor(Math.random() * o)
|
|
10
|
+
];
|
|
11
|
+
for (let r = 0; r < o; r++)
|
|
12
|
+
l.includes(r) ? n += a.charAt(
|
|
13
|
+
Math.floor(Math.random() * a.length)
|
|
14
|
+
) : n += e.charAt(
|
|
15
|
+
Math.floor(Math.random() * e.length)
|
|
16
|
+
);
|
|
17
|
+
return n;
|
|
18
|
+
}, ce = (o) => {
|
|
19
|
+
let e = 0, a = 0, n = 0, l = 0, r = 0, u = 0, c = 0, w = 0, d = 0, b = 0, p = 0, C = 0, v = 0, s = 0, m = 0, M = 0, A = 0, y = 0, F = 2, O = 2, T = 2, E = 2, I = 3, D = 3, K = 3, Z = 4, G = 4, H = 6, L = 0, q = 0, N = 0;
|
|
20
|
+
const Q = "abcdefghijklmnopqrstuvwxyz", W = "01234567890", X = ")!@#$%^&*()", Y = 8, h = o.replace(/\s+/g, "").split(/\s*/), g = h.length;
|
|
21
|
+
e = o.length * Z, a = o.length;
|
|
22
|
+
for (let t = 0; t < g; t++) {
|
|
23
|
+
h[t].match(/[A-Z]/g) ? (L !== 0 && L + 1 === t && C++, L = t, n++) : h[t].match(/[a-z]/g) ? (q !== 0 && q + 1 === t && v++, q = t, l++) : h[t].match(/[0-9]/g) ? (t > 0 && t < g - 1 && c++, N !== 0 && N + 1 === t && s++, N = t, r++) : h[t].match(/[^a-zA-Z0-9_]/g) && (t > 0 && t < g - 1 && c++, u++);
|
|
24
|
+
let i = !1;
|
|
25
|
+
for (let f = 0; f < g; f++)
|
|
26
|
+
h[t] == h[f] && t != f && (i = !0, p += Math.abs(g / (f - t)));
|
|
27
|
+
i && (b++, d = g - b, p = Math.ceil(d ? p / d : p));
|
|
28
|
+
}
|
|
29
|
+
for (let t = 0; t < 23; t++) {
|
|
30
|
+
let i = Q.substring(t, t + 3), f = i.split("").reverse().join("");
|
|
31
|
+
(o.toLowerCase().indexOf(i) != -1 || o.toLowerCase().indexOf(f) != -1) && m++;
|
|
32
|
+
}
|
|
33
|
+
for (let t = 0; t < 8; t++) {
|
|
34
|
+
let i = W.substring(t, t + 3);
|
|
35
|
+
var J = i.split("").reverse().join("");
|
|
36
|
+
(o.toLowerCase().indexOf(i) != -1 || o.toLowerCase().indexOf(J) != -1) && M++;
|
|
37
|
+
}
|
|
38
|
+
for (let t = 0; t < 8; t++) {
|
|
39
|
+
let i = X.substring(t, t + 3), f = i.split("").reverse().join("");
|
|
40
|
+
(o.toLowerCase().indexOf(i) != -1 || o.toLowerCase().indexOf(f) != -1) && A++;
|
|
41
|
+
}
|
|
42
|
+
n > 0 && n < a && (e = e + (a - n) * 2), l > 0 && l < a && (e = e + (a - l) * 2), r > 0 && r < a && (e = e + r * G), u > 0 && (e = e + u * H), c > 0 && (e = e + c * F), (l > 0 || n > 0) && u === 0 && r === 0 && (e = e - a), l === 0 && n === 0 && u === 0 && r > 0 && (e = e - a), b > 0 && (e = e - p), C > 0 && (e = e - C * O), v > 0 && (e = e - v * T), s > 0 && (e = e - s * E), m > 0 && (e = e - m * I), M > 0 && (e = e - M * D), A > 0 && (e = e - A * K), w = y;
|
|
43
|
+
let P = 0;
|
|
44
|
+
return o.length >= Y ? P = 3 : P = 4, w > P && (e = e + w * 2), e > 100 ? e = 100 : e < 0 && (e = 0), e;
|
|
45
|
+
}, $ = {
|
|
46
|
+
generatePassword: ue,
|
|
47
|
+
getPasswordStrength: ce
|
|
48
|
+
}, fe = { class: "flex border h-9 relative input-roundness input-border w-full" }, de = { class: "border-l select-none input-border input-control" }, pe = {
|
|
49
|
+
key: 1,
|
|
50
|
+
class: "inline-block float-right select-none"
|
|
51
|
+
}, ye = /* @__PURE__ */ ee({
|
|
52
|
+
name: "TInputPassword",
|
|
53
|
+
__name: "InputPassword",
|
|
54
|
+
props: /* @__PURE__ */ z({
|
|
55
|
+
autocomplete: { default: "current-password" },
|
|
56
|
+
encryptor: { type: Function, default: void 0 },
|
|
57
|
+
showCopy: { type: Boolean, default: !0 },
|
|
58
|
+
showRefresh: { type: Boolean, default: !1 },
|
|
59
|
+
showStrength: { type: Boolean, default: !1 }
|
|
60
|
+
}, {
|
|
61
|
+
modelValue: {
|
|
62
|
+
default: {
|
|
63
|
+
raw: "",
|
|
64
|
+
strength: 0,
|
|
65
|
+
hash: "",
|
|
66
|
+
updatedAt: void 0
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
modelModifiers: {}
|
|
70
|
+
}),
|
|
71
|
+
emits: /* @__PURE__ */ z(["generate", "enter"], ["update:modelValue"]),
|
|
72
|
+
setup(o, { expose: e, emit: a }) {
|
|
73
|
+
const n = o, l = te(o, "modelValue"), r = a, u = R("password"), c = R(null), { copy: w } = re(), d = R(!1), b = async (v, s) => {
|
|
74
|
+
if (s === void 0 && !v) {
|
|
75
|
+
l.value = { ...l.value };
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
l.value.strength = $.getPasswordStrength(l.value.raw), n.encryptor && (l.value.hash = await n.encryptor(l.value.raw));
|
|
79
|
+
}, p = () => {
|
|
80
|
+
c.value && c.value.$el && c.value.$el.focus();
|
|
81
|
+
}, C = async () => {
|
|
82
|
+
l.value.raw = $.generatePassword();
|
|
83
|
+
};
|
|
84
|
+
return le(() => l.value.raw, b, { immediate: !0 }), e({ focus: p }), (v, s) => {
|
|
85
|
+
const m = V("t-button"), M = V("t-input-text"), A = V("t-progress-line");
|
|
86
|
+
return S(), x(ne, null, [
|
|
87
|
+
j("div", fe, [
|
|
88
|
+
n.showCopy ? (S(), x("div", {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: B(["border-r select-none input-border input-control", { "w-12": n.showCopy }])
|
|
91
|
+
}, [
|
|
92
|
+
k(m, {
|
|
93
|
+
variant: "transparent",
|
|
94
|
+
icon: "copy",
|
|
95
|
+
size: "sm",
|
|
96
|
+
class: "h-full w-full justify-center",
|
|
97
|
+
animate: {
|
|
98
|
+
target: "icon",
|
|
99
|
+
trigger: "click",
|
|
100
|
+
animation: {
|
|
101
|
+
scale: 4,
|
|
102
|
+
yoyo: !0,
|
|
103
|
+
opacity: 0
|
|
104
|
+
},
|
|
105
|
+
reset: { opacity: 1, scale: 1 }
|
|
106
|
+
},
|
|
107
|
+
disabled: d.value,
|
|
108
|
+
onClick: s[0] || (s[0] = (y) => U(w)(l.value.raw))
|
|
109
|
+
}, null, 8, ["disabled"])
|
|
110
|
+
], 2)) : _("", !0),
|
|
111
|
+
n.showRefresh ? (S(), x("div", {
|
|
112
|
+
key: 1,
|
|
113
|
+
class: B(["border-r select-none input-border input-control", { "w-12": n.showRefresh }])
|
|
114
|
+
}, [
|
|
115
|
+
k(m, {
|
|
116
|
+
variant: "transparent",
|
|
117
|
+
icon: "refresh",
|
|
118
|
+
size: "sm",
|
|
119
|
+
class: "h-full w-full justify-center",
|
|
120
|
+
animate: {
|
|
121
|
+
target: "icon",
|
|
122
|
+
trigger: "click",
|
|
123
|
+
animation: { rotation: 360 },
|
|
124
|
+
reset: { rotation: 0 }
|
|
125
|
+
},
|
|
126
|
+
disabled: d.value,
|
|
127
|
+
onClick: C
|
|
128
|
+
}, null, 8, ["disabled"])
|
|
129
|
+
], 2)) : _("", !0),
|
|
130
|
+
k(M, {
|
|
131
|
+
modelValue: l.value.raw,
|
|
132
|
+
"onUpdate:modelValue": s[1] || (s[1] = (y) => l.value.raw = y),
|
|
133
|
+
type: u.value,
|
|
134
|
+
autocomplete: n.autocomplete,
|
|
135
|
+
disabled: d.value,
|
|
136
|
+
"disable-style": !0,
|
|
137
|
+
ref_key: "input",
|
|
138
|
+
ref: c,
|
|
139
|
+
class: "w-full px-2 input-bg-color input-text-color input-outline input-roundness",
|
|
140
|
+
onKeyup: s[2] || (s[2] = oe((y) => r("enter"), ["enter"]))
|
|
141
|
+
}, null, 8, ["modelValue", "type", "autocomplete", "disabled"]),
|
|
142
|
+
j("div", de, [
|
|
143
|
+
k(m, {
|
|
144
|
+
variant: "transparent",
|
|
145
|
+
size: "sm",
|
|
146
|
+
class: "h-full w-full justify-center",
|
|
147
|
+
icon: u.value === "password" ? "eye" : "eye-off",
|
|
148
|
+
disabled: d.value,
|
|
149
|
+
onClick: s[3] || (s[3] = (y) => u.value = u.value === "password" ? "text" : "password")
|
|
150
|
+
}, null, 8, ["icon", "disabled"])
|
|
151
|
+
])
|
|
152
|
+
]),
|
|
153
|
+
n.showStrength ? (S(), se(A, {
|
|
154
|
+
key: 0,
|
|
155
|
+
value: l.value.strength,
|
|
156
|
+
class: "mt-0.5",
|
|
157
|
+
height: 2.5,
|
|
158
|
+
"show-percentage": !1
|
|
159
|
+
}, null, 8, ["value"])) : _("", !0),
|
|
160
|
+
l.value.updatedAt ? (S(), x("small", pe, " Last updated " + ae(U(ie)(new Date(l.value.updatedAt), "MMMM do yyyy, hh:mm:ss")), 1)) : _("", !0)
|
|
161
|
+
], 64);
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
export {
|
|
166
|
+
ye as _
|
|
167
|
+
};
|
package/dist/InputRadio.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as a } from "./InputRadio.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as t } from "./plugin-
|
|
1
|
+
import { _ as a } from "./InputRadio.vue_vue_type_script_setup_true_lang-Cu7lzDAh.js";
|
|
2
|
+
import { p as t } from "./plugin-Bog7k3Qf.js";
|
|
3
3
|
export {
|
|
4
4
|
a as InputRadio,
|
|
5
5
|
t as InputRadioPlugin
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as m, inject as e, openBlock as u, createElementBlock as b, createElementVNode as o, unref as r, toDisplayString as v } from "vue";
|
|
2
2
|
const h = { class: "h-9 inline-flex items-center" }, f = ["value", "name", "disabled", "checked"];
|
|
3
3
|
let _ = 0;
|
|
4
|
-
const
|
|
4
|
+
const g = /* @__PURE__ */ m({
|
|
5
5
|
name: "TInputRadio",
|
|
6
6
|
__name: "InputRadio",
|
|
7
7
|
props: {
|
|
@@ -10,25 +10,25 @@ const k = /* @__PURE__ */ m({
|
|
|
10
10
|
},
|
|
11
11
|
setup(t) {
|
|
12
12
|
const i = `radio_${++_}`, c = e("name", ""), a = t, l = e("model", ""), d = e("change", () => {
|
|
13
|
-
}),
|
|
14
|
-
return (
|
|
13
|
+
}), s = e("disabled", !1);
|
|
14
|
+
return (p, n) => (u(), b("div", h, [
|
|
15
15
|
o("input", {
|
|
16
16
|
value: a.value,
|
|
17
17
|
name: r(c),
|
|
18
18
|
id: i,
|
|
19
|
-
disabled: r(
|
|
19
|
+
disabled: r(s),
|
|
20
20
|
checked: a.value === r(l),
|
|
21
21
|
type: "radio",
|
|
22
|
-
class: "form-radio
|
|
22
|
+
class: "form-radio w-5 h-5 border border-caipira-primary-inverted checked:hover:border-caipira-primary-inverted checked:focus:border-caipira-primary-inverted checked:border-caipira-primary-inverted input-outline focus:input-outline bg-caipira-primary color-caipira-primary",
|
|
23
23
|
onChange: n[0] || (n[0] = (y) => r(d)(a.value))
|
|
24
24
|
}, null, 40, f),
|
|
25
25
|
o("label", {
|
|
26
26
|
class: "cursor-pointer pl-2 mr-3 input-label",
|
|
27
27
|
for: i
|
|
28
|
-
}, v(
|
|
28
|
+
}, v(p.label), 1)
|
|
29
29
|
]));
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
g as _
|
|
34
34
|
};
|
package/dist/Popover.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as p } from "./Popover.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as P } from "./plugin
|
|
1
|
+
import { _ as p } from "./Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js";
|
|
2
|
+
import { p as P } from "./plugin-CdJ1wBq2.js";
|
|
3
3
|
export {
|
|
4
4
|
p as Popover,
|
|
5
5
|
P as PopoverPlugin
|
|
@@ -20,13 +20,13 @@ function tt(t) {
|
|
|
20
20
|
function yt(t) {
|
|
21
21
|
return t === "x" ? "y" : "x";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function zt(t) {
|
|
24
24
|
return t === "y" ? "height" : "width";
|
|
25
25
|
}
|
|
26
26
|
function X(t) {
|
|
27
27
|
return ["top", "bottom"].includes(j(t)) ? "y" : "x";
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Ht(t) {
|
|
30
30
|
return yt(X(t));
|
|
31
31
|
}
|
|
32
32
|
function It(t) {
|
|
@@ -69,7 +69,7 @@ function dt(t, e, n) {
|
|
|
69
69
|
reference: o,
|
|
70
70
|
floating: i
|
|
71
71
|
} = t;
|
|
72
|
-
const l = X(e), r =
|
|
72
|
+
const l = X(e), r = Ht(e), c = zt(r), s = j(e), a = l === "y", f = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, h = o[c] / 2 - i[c] / 2;
|
|
73
73
|
let u;
|
|
74
74
|
switch (s) {
|
|
75
75
|
case "top":
|
|
@@ -350,8 +350,8 @@ const Ut = function(t) {
|
|
|
350
350
|
v = f || w ? N(y, R) : R;
|
|
351
351
|
}
|
|
352
352
|
if (w && !f) {
|
|
353
|
-
const R = E(s.left, 0), x = E(s.right, 0),
|
|
354
|
-
d ? C = h - 2 * (R !== 0 || x !== 0 ? R + x : E(s.left, s.right)) : v = u - 2 * (
|
|
353
|
+
const R = E(s.left, 0), x = E(s.right, 0), z = E(s.top, 0), H = E(s.bottom, 0);
|
|
354
|
+
d ? C = h - 2 * (R !== 0 || x !== 0 ? R + x : E(s.left, s.right)) : v = u - 2 * (z !== 0 || H !== 0 ? z + H : E(s.top, s.bottom));
|
|
355
355
|
}
|
|
356
356
|
await r({
|
|
357
357
|
...e,
|
|
@@ -862,17 +862,17 @@ function xe(t, e, n) {
|
|
|
862
862
|
};
|
|
863
863
|
if (!f.value)
|
|
864
864
|
return x;
|
|
865
|
-
const
|
|
865
|
+
const z = wt(f.value, d.value), H = wt(f.value, h.value);
|
|
866
866
|
return s.value ? {
|
|
867
867
|
...x,
|
|
868
|
-
transform: "translate(" +
|
|
868
|
+
transform: "translate(" + z + "px, " + H + "px)",
|
|
869
869
|
...At(f.value) >= 1.5 && {
|
|
870
870
|
willChange: "transform"
|
|
871
871
|
}
|
|
872
872
|
} : {
|
|
873
873
|
position: u.value,
|
|
874
|
-
left:
|
|
875
|
-
top:
|
|
874
|
+
left: z + "px",
|
|
875
|
+
top: H + "px"
|
|
876
876
|
};
|
|
877
877
|
});
|
|
878
878
|
let w;
|
|
@@ -926,7 +926,8 @@ const Oe = /* @__PURE__ */ Dt({
|
|
|
926
926
|
trigger: { default: Nt.CLICK },
|
|
927
927
|
disabled: { type: Boolean, default: !1 },
|
|
928
928
|
placement: { default: $t.BOTTOM },
|
|
929
|
-
slotWrapperClasses: { default: "rounded-lg" }
|
|
929
|
+
slotWrapperClasses: { default: "rounded-lg" },
|
|
930
|
+
width: { default: "auto" }
|
|
930
931
|
}, {
|
|
931
932
|
open: { type: Boolean, default: !1 },
|
|
932
933
|
openModifiers: {}
|
|
@@ -939,6 +940,8 @@ const Oe = /* @__PURE__ */ Dt({
|
|
|
939
940
|
pe(1),
|
|
940
941
|
we({
|
|
941
942
|
apply({ elements: m }) {
|
|
943
|
+
if (o.width === "static")
|
|
944
|
+
return;
|
|
942
945
|
const p = m.reference.getBoundingClientRect();
|
|
943
946
|
Object.assign(m.floating.style, {
|
|
944
947
|
minWidth: `${p.width}px`
|
|
@@ -970,7 +973,7 @@ const Oe = /* @__PURE__ */ Dt({
|
|
|
970
973
|
role: "tooltip",
|
|
971
974
|
id: i,
|
|
972
975
|
style: Pt(F(d)),
|
|
973
|
-
class: Vt(["bg-caipira-primary", {
|
|
976
|
+
class: Vt(["bg-caipira-primary z-10", {
|
|
974
977
|
[o.slotWrapperClasses]: !0
|
|
975
978
|
}])
|
|
976
979
|
}, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './Table.css';
|
|
2
2
|
import { defineComponent as M, useSlots as O, ref as k, reactive as F, computed as x, resolveComponent as K, openBlock as a, createElementBlock as s, createElementVNode as m, normalizeClass as p, createCommentVNode as c, createVNode as E, Fragment as h, renderList as V, toDisplayString as T, createBlock as b, renderSlot as $, createTextVNode as P } from "vue";
|
|
3
3
|
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
const G = { class: "
|
|
4
|
+
const G = { class: "w-full color-text" }, J = ["onClick"], Q = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "text-left w-10 h-0"
|
|
7
7
|
}, W = {
|
|
@@ -171,7 +171,7 @@ const G = { class: "min-w-full relative color-text" }, J = ["onClick"], Q = {
|
|
|
171
171
|
]);
|
|
172
172
|
};
|
|
173
173
|
}
|
|
174
|
-
}), ae = /* @__PURE__ */ q(Z, [["__scopeId", "data-v-
|
|
174
|
+
}), ae = /* @__PURE__ */ q(Z, [["__scopeId", "data-v-9a21839d"]]);
|
|
175
175
|
export {
|
|
176
176
|
ae as T
|
|
177
177
|
};
|
package/dist/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
table>thead>tr[data-v-
|
|
1
|
+
table>thead>tr[data-v-9a21839d]{border-top:1px solid var(--border-color)}table th[data-v-9a21839d],table td[data-v-9a21839d]{border-bottom:1px solid var(--border-color)}
|
package/dist/Table.js
CHANGED
package/dist/Tag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as r } from "./Tag.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p } from "./plugin-
|
|
1
|
+
import { _ as r } from "./Tag.vue_vue_type_script_setup_true_lang-DMigzW22.js";
|
|
2
|
+
import { p } from "./plugin-DgCa2m12.js";
|
|
3
3
|
export {
|
|
4
4
|
r as Tag,
|
|
5
5
|
p as TagPlugin
|