@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.
- package/README.md +1 -0
- package/dist/Avatar.js +2 -2
- package/dist/Avatar.vue_vue_type_script_setup_true_lang-C8p8_0Uc.js +47 -0
- package/dist/{Button-COkapD0v.js → Button-CAiIEdkK.js} +47 -46
- package/dist/Button.css +1 -1
- package/dist/Button.js +2 -2
- package/dist/Dropdown.js +2 -2
- 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
- package/dist/Icon.js +2 -2
- package/dist/Icon.vue_vue_type_script_setup_true_lang-DXUyEtqW.js +45 -0
- 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/InputPhone.js +2 -2
- package/dist/{InputPhone.vue_vue_type_script_setup_true_lang-DXtliNyv.js → InputPhone.vue_vue_type_script_setup_true_lang-B4TULqLW.js} +24 -23
- package/dist/InputPrice.js +2 -2
- package/dist/InputPrice.vue_vue_type_script_setup_true_lang-BX4rsYIr.js +67 -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/InputSelect.js +2 -2
- package/dist/InputSelect.vue_vue_type_script_setup_true_lang-BlA3DIYZ.js +232 -0
- package/dist/Popconfirm.js +2 -2
- package/dist/Popconfirm.vue_vue_type_script_setup_true_lang-XyjBUx0p.js +62 -0
- package/dist/Popover.js +2 -2
- package/dist/Popover.vue_vue_type_script_setup_true_lang-dnL75W40.js +987 -0
- 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 +74 -0
- package/dist/components.js +14 -14
- package/dist/composables.js +27 -16
- package/dist/index.css +2 -1
- package/dist/{plugin-VtriDxZB.js → plugin-Bog7k3Qf.js} +1 -1
- package/dist/{plugin-Dy14_LJS.js → plugin-BtF6kCcf.js} +1 -1
- package/dist/{plugin-BwRXtPzh.js → plugin-CNqL90UL.js} +1 -1
- package/dist/{plugin-B2fe1hFi.js → plugin-CTMcmMdr.js} +1 -1
- package/dist/{plugin-Dp-F27SY.js → plugin-CdJ1wBq2.js} +1 -1
- package/dist/{plugin-CGIfywdY.js → plugin-CrHDShgh.js} +1 -1
- package/dist/{plugin-CClGi0co.js → plugin-D8CsjFdw.js} +1 -1
- package/dist/{plugin-BOXtmhcZ.js → plugin-DDoM02Fq.js} +1 -1
- package/dist/{plugin-B97SpnhW.js → plugin-DLkeyKDM.js} +1 -1
- package/dist/{plugin-BR7RSh1H.js → plugin-Daf_swsz.js} +1 -1
- package/dist/{plugin-CBhgqomZ.js → plugin-DcWjzc_X.js} +1 -1
- package/dist/{plugin-BriPeDzu.js → plugin-Dk3KBChD.js} +1 -1
- package/dist/{plugin-Bt6de9ZA.js → plugin-Ee4Z5Rtp.js} +1 -1
- package/dist/{plugin-DgCWOSWh.js → plugin-z8Hr_T_O.js} +1 -1
- package/dist/{plugins-CxgvV4Py.js → plugins-ChB184ip.js} +22 -22
- package/dist/plugins.js +22 -22
- package/dist/tamandua.js +1 -1
- package/dist/types/components/InputSelect/types.d.ts +3 -1
- package/dist/types/components/Popconfirm/Popconfirm.vue.d.ts +3 -1
- package/dist/types/components/Popover/Popover.vue.d.ts +51 -35
- package/dist/types/components/Popover/types.d.ts +7 -1
- package/dist/types/composables/useDomHelpers.d.ts +0 -4
- package/dist/useDomHelpers-CGVrQd35.js +19 -0
- package/package.json +3 -3
- package/dist/Avatar.vue_vue_type_script_setup_true_lang-Cjz3Vlw9.js +0 -51
- package/dist/Icon.vue_vue_type_script_setup_true_lang-CNUyv7CY.js +0 -49
- package/dist/InputDate.vue_vue_type_script_setup_true_lang-Do47MTJJ.js +0 -188
- package/dist/InputPrice.vue_vue_type_script_setup_true_lang-DBMW1AwZ.js +0 -66
- package/dist/InputSelect.vue_vue_type_script_setup_true_lang-ukwmeVxc.js +0 -226
- package/dist/Popconfirm.vue_vue_type_script_setup_true_lang-BNpLdXq7.js +0 -63
- package/dist/Popover.vue_vue_type_script_setup_true_lang-B4Polh2y.js +0 -985
- package/dist/Tag.vue_vue_type_script_setup_true_lang-0p-7UEvO.js +0 -72
- package/dist/types/components/EventListener/EventListener.vue.d.ts +0 -6
- package/dist/useDomHelpers-5CFMo6bx.js +0 -23
- package/dist/useRender-D8PeooXE.js +0 -16
|
@@ -1,50 +1,66 @@
|
|
|
1
1
|
import { ElementPosition, ElementTrigger } from '../../enums/ui.js';
|
|
2
|
-
import { PopoverProps } from './types.js';
|
|
3
2
|
|
|
4
|
-
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<
|
|
5
|
-
|
|
6
|
-
disabled:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
4
|
+
open: import('vue').PropType<boolean>;
|
|
5
|
+
disabled: {
|
|
6
|
+
type: import("vue").PropType<boolean>;
|
|
7
|
+
default: boolean;
|
|
8
|
+
};
|
|
9
|
+
width: {
|
|
10
|
+
type: import("vue").PropType<"auto" | "static">;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
placement: {
|
|
14
|
+
type: import("vue").PropType<"top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start">;
|
|
15
|
+
default: ElementPosition;
|
|
16
|
+
};
|
|
17
|
+
slotWrapperClasses: {
|
|
18
|
+
type: import("vue").PropType<string>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
trigger: {
|
|
22
|
+
type: import("vue").PropType<"click" | "hover">;
|
|
23
|
+
default: ElementTrigger;
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
name: string;
|
|
27
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
open: import('vue').PropType<boolean>;
|
|
29
|
+
disabled: {
|
|
30
|
+
type: import("vue").PropType<boolean>;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
width: {
|
|
34
|
+
type: import("vue").PropType<"auto" | "static">;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
placement: {
|
|
38
|
+
type: import("vue").PropType<"top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start">;
|
|
39
|
+
default: ElementPosition;
|
|
40
|
+
};
|
|
41
|
+
slotWrapperClasses: {
|
|
42
|
+
type: import("vue").PropType<string>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
trigger: {
|
|
46
|
+
type: import("vue").PropType<"click" | "hover">;
|
|
47
|
+
default: ElementTrigger;
|
|
48
|
+
};
|
|
49
|
+
}>>, {
|
|
19
50
|
disabled: boolean;
|
|
20
|
-
|
|
51
|
+
width: "auto" | "static";
|
|
21
52
|
placement: "top-start" | "top" | "top-end" | "right-start" | "right" | "right-end" | "bottom-end" | "bottom" | "bottom-start" | "left-end" | "left" | "left-start";
|
|
22
53
|
slotWrapperClasses: string;
|
|
23
54
|
trigger: "click" | "hover";
|
|
24
55
|
}, {}>, {
|
|
25
|
-
default?(_: {
|
|
56
|
+
default?(_: {
|
|
57
|
+
onTogglePopover: (isVisible?: boolean) => void;
|
|
58
|
+
}): any;
|
|
26
59
|
content?(_: {
|
|
27
60
|
onTogglePopover: (isVisible?: boolean) => void;
|
|
28
61
|
}): any;
|
|
29
62
|
}>;
|
|
30
63
|
export default _default;
|
|
31
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
32
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
33
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
34
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
35
|
-
} : {
|
|
36
|
-
type: import('vue').PropType<T[K]>;
|
|
37
|
-
required: true;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
type __VLS_WithDefaults<P, D> = {
|
|
41
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
42
|
-
default: D[K];
|
|
43
|
-
}> : P[K];
|
|
44
|
-
};
|
|
45
|
-
type __VLS_Prettify<T> = {
|
|
46
|
-
[K in keyof T]: T[K];
|
|
47
|
-
} & {};
|
|
48
64
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
49
65
|
new (): {
|
|
50
66
|
$slots: S;
|
|
@@ -3,7 +3,13 @@ import { ElementPosition, ElementTrigger } from '../../enums/ui.js';
|
|
|
3
3
|
export type PopoverProps = {
|
|
4
4
|
trigger?: `${ElementTrigger}`;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
isVisible?: boolean | null;
|
|
7
6
|
placement?: `${ElementPosition}`;
|
|
8
7
|
slotWrapperClasses?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Popover width strategy.
|
|
10
|
+
*
|
|
11
|
+
* `auto`: Default, auto resize based on content.
|
|
12
|
+
* `static`: Leave width untouched.
|
|
13
|
+
*/
|
|
14
|
+
width?: "auto" | "static";
|
|
9
15
|
};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { ComponentInternalInstance } from 'vue';
|
|
2
|
-
|
|
3
1
|
export default function useDomHelpers(): {
|
|
4
|
-
isPopoverActivator: (instance?: ComponentInternalInstance | undefined) => boolean;
|
|
5
|
-
onPopoverActivatorClick: (event: MouseEvent, el: any) => void;
|
|
6
2
|
wasClickOutsideOfContainer: (event: MouseEvent, container: HTMLElement) => boolean;
|
|
7
3
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const n = (t, r) => {
|
|
2
|
+
let e = t.target;
|
|
3
|
+
if (!e)
|
|
4
|
+
return !1;
|
|
5
|
+
do {
|
|
6
|
+
if (e === r)
|
|
7
|
+
return t.stopPropagation(), !1;
|
|
8
|
+
e = e?.parentNode;
|
|
9
|
+
} while (e);
|
|
10
|
+
return !0;
|
|
11
|
+
};
|
|
12
|
+
function a() {
|
|
13
|
+
return {
|
|
14
|
+
wasClickOutsideOfContainer: n
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
a as u
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caipira/tamandua",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "UI library for the Caipira ecosystem",
|
|
6
6
|
"license": "GPL-3.0-only",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"prepublishOnly": "npm run build:prod"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@
|
|
73
|
+
"@floating-ui/vue": "^1.0.6",
|
|
74
74
|
"d3": "^7.9.0",
|
|
75
75
|
"date-fns": "^2.25.0",
|
|
76
76
|
"gsap": "^3.12.2"
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
"vue-i18n": "9"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@storybook/test": "^8.0.8",
|
|
85
84
|
"@faker-js/faker": "^8.4.1",
|
|
86
85
|
"@storybook/addon-actions": "^8.0.8",
|
|
87
86
|
"@storybook/addon-essentials": "^8.0.8",
|
|
@@ -89,6 +88,7 @@
|
|
|
89
88
|
"@storybook/addon-links": "^8.0.8",
|
|
90
89
|
"@storybook/addon-themes": "^8.0.8",
|
|
91
90
|
"@storybook/blocks": "^8.0.8",
|
|
91
|
+
"@storybook/test": "^8.0.8",
|
|
92
92
|
"@storybook/vue3": "^8.0.8",
|
|
93
93
|
"@storybook/vue3-vite": "^8.0.8",
|
|
94
94
|
"@types/d3": "^7.4.3",
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, getCurrentInstance as h, computed as _, resolveComponent as y, openBlock as l, createElementBlock as r, normalizeClass as v, unref as t, createBlock as S, toDisplayString as z, createCommentVNode as b } from "vue";
|
|
2
|
-
import { u as g } from "./useDomHelpers-5CFMo6bx.js";
|
|
3
|
-
import { a as o, b as i } from "./ui-BC6H9E93.js";
|
|
4
|
-
const C = ["role"], k = ["src"], w = { key: 2 }, D = /* @__PURE__ */ f({
|
|
5
|
-
name: "TAvatar",
|
|
6
|
-
__name: "Avatar",
|
|
7
|
-
props: {
|
|
8
|
-
icon: {},
|
|
9
|
-
text: { default: "" },
|
|
10
|
-
role: { default: "" },
|
|
11
|
-
size: { default: o.Default },
|
|
12
|
-
image: { default: "" },
|
|
13
|
-
shape: { default: i.Circle },
|
|
14
|
-
disableStyle: { type: Boolean, default: !1 }
|
|
15
|
-
},
|
|
16
|
-
setup(c) {
|
|
17
|
-
const e = c, a = h(), { isPopoverActivator: s, onPopoverActivatorClick: u } = g(), m = _(() => e.role !== "" ? e.role : a && s(a) ? "button" : ""), p = (n) => {
|
|
18
|
-
a && s(a) && u(n, a);
|
|
19
|
-
};
|
|
20
|
-
return (n, x) => {
|
|
21
|
-
const d = y("t-icon");
|
|
22
|
-
return l(), r("div", {
|
|
23
|
-
role: m.value,
|
|
24
|
-
class: v([{
|
|
25
|
-
"h-5 w-5": !e.disableStyle && e.size === t(o).ExtraSmall,
|
|
26
|
-
"h-7 w-7": !e.disableStyle && e.size === t(o).Small,
|
|
27
|
-
"h-10 w-10": !e.disableStyle && e.size === t(o).Default,
|
|
28
|
-
"h-20 w-20": !e.disableStyle && e.size === t(o).Large,
|
|
29
|
-
"h-40 w-40": !e.disableStyle && e.size === t(o).ExtraLarge,
|
|
30
|
-
"rounded-full": e.shape === t(i).Circle,
|
|
31
|
-
rounded: e.shape === t(i).Square
|
|
32
|
-
}, "overflow-hidden inline-flex items-center justify-center bg-caipira-primary-inverted"]),
|
|
33
|
-
onClick: p
|
|
34
|
-
}, [
|
|
35
|
-
e.image ? (l(), r("img", {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "w-full h-full object-cover",
|
|
38
|
-
src: e.image
|
|
39
|
-
}, null, 8, k)) : e.icon ? (l(), S(d, {
|
|
40
|
-
key: 1,
|
|
41
|
-
class: "color-caipira-primary",
|
|
42
|
-
icon: e.icon,
|
|
43
|
-
size: e.size
|
|
44
|
-
}, null, 8, ["icon", "size"])) : e.text ? (l(), r("span", w, z(e.text), 1)) : b("", !0)
|
|
45
|
-
], 10, C);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
export {
|
|
50
|
-
D as _
|
|
51
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent as k, ref as g, getCurrentInstance as b, computed as v, watch as w, openBlock as y, createElementBlock as x, normalizeClass as z, unref as e, normalizeStyle as _ } from "vue";
|
|
2
|
-
import { u as C } from "./useDomHelpers-5CFMo6bx.js";
|
|
3
|
-
import { a as t } from "./ui-BC6H9E93.js";
|
|
4
|
-
const E = (r, n) => {
|
|
5
|
-
const s = r[n];
|
|
6
|
-
return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((c, o) => {
|
|
7
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, new Error("Unknown variable dynamic import: " + n)));
|
|
8
|
-
});
|
|
9
|
-
}, D = ["innerHTML", "role"], M = /* @__PURE__ */ k({
|
|
10
|
-
name: "TIcon",
|
|
11
|
-
__name: "Icon",
|
|
12
|
-
props: {
|
|
13
|
-
icon: {},
|
|
14
|
-
role: { default: "" },
|
|
15
|
-
size: { default: t.Default }
|
|
16
|
-
},
|
|
17
|
-
setup(r, { expose: n }) {
|
|
18
|
-
const s = r, c = g(""), o = b(), a = g(null), { isPopoverActivator: m, onPopoverActivatorClick: l } = C(), u = v(() => s.role === "button"), f = v(() => s.role !== "" ? s.role : o && m(o) ? "button" : ""), h = (i) => {
|
|
19
|
-
o && m(o) && l(i, o);
|
|
20
|
-
}, d = async () => (await E(/* @__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;
|
|
21
|
-
return w(
|
|
22
|
-
() => s.icon,
|
|
23
|
-
async (i, p) => {
|
|
24
|
-
i !== p && (c.value = await d());
|
|
25
|
-
},
|
|
26
|
-
{ immediate: !0 }
|
|
27
|
-
), n({ reference: a }), (i, p) => (y(), x("i", {
|
|
28
|
-
innerHTML: c.value,
|
|
29
|
-
ref_key: "reference",
|
|
30
|
-
ref: a,
|
|
31
|
-
class: z(["inline-block fill-current", {
|
|
32
|
-
"w-3 h-3": s.size === e(t).ExtraSmall,
|
|
33
|
-
"w-5 h-5": s.size === e(t).Small,
|
|
34
|
-
"w-6 h-6": s.size === e(t).Default,
|
|
35
|
-
"w-12 h-12": s.size === e(t).Large,
|
|
36
|
-
"w-16 h-16": s.size === e(t).ExtraLarge,
|
|
37
|
-
"cursor-pointer": u.value
|
|
38
|
-
}]),
|
|
39
|
-
style: _(
|
|
40
|
-
typeof s.size == "number" ? `width: ${s.size}px; height: ${s.size}px;` : ""
|
|
41
|
-
),
|
|
42
|
-
role: f.value,
|
|
43
|
-
onClick: h
|
|
44
|
-
}, null, 14, D));
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
M as _
|
|
49
|
-
};
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { defineComponent as X, ref as f, watch as O, computed as Y, onBeforeMount as Z, resolveComponent as ee, openBlock as c, createElementBlock as v, createElementVNode as n, withKeys as te, withDirectives as oe, toDisplayString as x, unref as le, Fragment as F, renderList as T, normalizeClass as $, createVNode as B, vShow as ne } from "vue";
|
|
2
|
-
import { u as ae } from "./useDomHelpers-5CFMo6bx.js";
|
|
3
|
-
import { f as E } from "./index-CjvqeRf7.js";
|
|
4
|
-
import { g as L, s as S, a as se, b as N, c as re } from "./index-CuyePt3m.js";
|
|
5
|
-
const ue = ["value"], ie = {
|
|
6
|
-
class: "mt-9 shadow-md p-4 absolute top-0 left-0 select-none z-10 bg-caipira-primary border input-border input-roundness",
|
|
7
|
-
style: { width: "17rem" }
|
|
8
|
-
}, de = { class: "flex justify-between items-center mb-2" }, ce = { class: "text-lg font-bold" }, ve = ["value", "selected"], pe = ["disabled"], me = ["disabled"], fe = { class: "flex flex-wrap mb-3 -mx-1" }, he = { class: "font-medium text-center text-xs" }, ye = { class: "flex flex-wrap -mx-1" }, ge = ["onClick"], k = !0, ke = /* @__PURE__ */ X({
|
|
9
|
-
name: "TInputDate",
|
|
10
|
-
__name: "InputDate",
|
|
11
|
-
props: {
|
|
12
|
-
value: {},
|
|
13
|
-
modelValue: {},
|
|
14
|
-
initialValue: {}
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:model-value"],
|
|
17
|
-
setup(j, { emit: z }) {
|
|
18
|
-
const M = z, a = j, h = /* @__PURE__ */ new Date(), A = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], V = f(null), y = f(!1), { wasClickOutsideOfContainer: K } = ae(), e = f(/* @__PURE__ */ new Date()), s = f(e.value.getFullYear()), p = f(e.value.getMonth());
|
|
19
|
-
O(
|
|
20
|
-
() => e.value,
|
|
21
|
-
(t) => {
|
|
22
|
-
p.value = t.getMonth(), s.value = t.getFullYear();
|
|
23
|
-
},
|
|
24
|
-
{ immediate: !0 }
|
|
25
|
-
);
|
|
26
|
-
let m, g, b;
|
|
27
|
-
O(
|
|
28
|
-
() => a.modelValue,
|
|
29
|
-
() => {
|
|
30
|
-
if (a.modelValue)
|
|
31
|
-
switch (typeof a.modelValue) {
|
|
32
|
-
case "string":
|
|
33
|
-
const t = new Date(a.modelValue);
|
|
34
|
-
t && M("update:model-value", t);
|
|
35
|
-
break;
|
|
36
|
-
case "object":
|
|
37
|
-
e.value = a.modelValue, m = e.value.getDate(), g = e.value.getFullYear(), b = e.value.getMonth();
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
{ immediate: !0 }
|
|
42
|
-
);
|
|
43
|
-
const P = Y(() => {
|
|
44
|
-
if (!a.modelValue)
|
|
45
|
-
return "";
|
|
46
|
-
const t = typeof a.modelValue == "string" ? new Date(a.modelValue) : a.modelValue;
|
|
47
|
-
return E(t, "yyyy-MM-dd");
|
|
48
|
-
}), R = Y(() => {
|
|
49
|
-
const t = h.getFullYear();
|
|
50
|
-
return Array.from({ length: 49 }, (i, r) => t - 1 - r).reverse().concat(Array.from({ length: 51 }, (i, r) => t + r));
|
|
51
|
-
}), W = (t) => e.value = se(
|
|
52
|
-
e.value,
|
|
53
|
-
t?.target?.value
|
|
54
|
-
), w = () => {
|
|
55
|
-
y.value = !1, e.value = m ? a.modelValue : /* @__PURE__ */ new Date();
|
|
56
|
-
}, G = (t) => {
|
|
57
|
-
t.overflow && (e.value = t.overflow > 0 ? N(e.value, t.overflow) : S(e.value, ~t.overflow + 1)), e.value = re(e.value, t.day), M("update:model-value", e.value), w();
|
|
58
|
-
}, H = () => {
|
|
59
|
-
e.value = S(e.value, 1);
|
|
60
|
-
}, q = () => {
|
|
61
|
-
e.value = N(e.value, 1);
|
|
62
|
-
}, J = Y(() => {
|
|
63
|
-
const i = [], r = new Date(s.value, p.value).getDay(), l = L(S(e.value, 1)), I = L(e.value), C = h.getDate(), D = h.getFullYear(), d = h.getMonth();
|
|
64
|
-
let _ = 1, u = p.value - 1;
|
|
65
|
-
for (let o = l - (r - 1); o <= l; o++)
|
|
66
|
-
i.push({
|
|
67
|
-
key: `${o}-${d - 1}`,
|
|
68
|
-
day: o,
|
|
69
|
-
isToday: C === o && d === u && D === s.value,
|
|
70
|
-
selected: m === o && b === u && g === s.value,
|
|
71
|
-
overflow: -1
|
|
72
|
-
}), _++;
|
|
73
|
-
u = p.value;
|
|
74
|
-
for (let o = 1; o <= I; o++)
|
|
75
|
-
i.push({
|
|
76
|
-
key: `${o}-${d}`,
|
|
77
|
-
day: o,
|
|
78
|
-
isToday: C === o && d === u && D === s.value,
|
|
79
|
-
selected: m === o && b === u && g === s.value,
|
|
80
|
-
overflow: 0
|
|
81
|
-
}), _++;
|
|
82
|
-
u = p.value + 1;
|
|
83
|
-
for (let o = 1; _ <= 42; o++)
|
|
84
|
-
i.push({
|
|
85
|
-
key: `${o}-${d + 1}`,
|
|
86
|
-
day: o,
|
|
87
|
-
isToday: C === o && d === u && D === s.value,
|
|
88
|
-
selected: m === o && b === u && g === s.value,
|
|
89
|
-
overflow: 1
|
|
90
|
-
}), _++;
|
|
91
|
-
return i;
|
|
92
|
-
}), Q = () => {
|
|
93
|
-
y.value ? w() : y.value = !0;
|
|
94
|
-
}, U = (t) => {
|
|
95
|
-
V.value && K(t, V.value) && w();
|
|
96
|
-
};
|
|
97
|
-
return Z(() => {
|
|
98
|
-
document.addEventListener("click", U), !a.modelValue && a.initialValue && M("update:model-value", a.initialValue);
|
|
99
|
-
}), (t, i) => {
|
|
100
|
-
const r = ee("t-icon");
|
|
101
|
-
return c(), v("div", {
|
|
102
|
-
class: "inline-block relative w-full",
|
|
103
|
-
ref_key: "wrapperRef",
|
|
104
|
-
ref: V
|
|
105
|
-
}, [
|
|
106
|
-
n("input", {
|
|
107
|
-
type: "text",
|
|
108
|
-
readonly: "",
|
|
109
|
-
value: P.value,
|
|
110
|
-
onClick: Q,
|
|
111
|
-
onKeydown: te(w, ["escape"]),
|
|
112
|
-
class: "w-full pl-2 pr-10 py-2 leading-none input-bg-color input-text-color border input-border input-roundness input-outline",
|
|
113
|
-
placeholder: "Select date"
|
|
114
|
-
}, null, 40, ue),
|
|
115
|
-
oe(n("div", ie, [
|
|
116
|
-
n("div", de, [
|
|
117
|
-
n("div", null, [
|
|
118
|
-
n("span", ce, x(le(E)(e.value, "MMMM")), 1),
|
|
119
|
-
n("select", {
|
|
120
|
-
class: "ml-2 text-lg input-bg-color border input-border input-outline",
|
|
121
|
-
onChange: W
|
|
122
|
-
}, [
|
|
123
|
-
(c(!0), v(F, null, T(R.value, (l) => (c(), v("option", {
|
|
124
|
-
key: l,
|
|
125
|
-
value: l,
|
|
126
|
-
selected: l === s.value
|
|
127
|
-
}, x(l), 9, ve))), 128))
|
|
128
|
-
], 32)
|
|
129
|
-
]),
|
|
130
|
-
n("div", null, [
|
|
131
|
-
n("button", {
|
|
132
|
-
type: "button",
|
|
133
|
-
class: $(["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: H
|
|
138
|
-
}, [
|
|
139
|
-
B(r, { icon: "chevron-left" })
|
|
140
|
-
], 10, pe),
|
|
141
|
-
n("button", {
|
|
142
|
-
type: "button",
|
|
143
|
-
class: $(["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
|
-
B(r, { icon: "chevron-right" })
|
|
150
|
-
], 10, me)
|
|
151
|
-
])
|
|
152
|
-
]),
|
|
153
|
-
n("div", fe, [
|
|
154
|
-
(c(), v(F, null, T(A, (l) => n("div", {
|
|
155
|
-
key: l,
|
|
156
|
-
style: { width: "14.26%" },
|
|
157
|
-
class: "px-1"
|
|
158
|
-
}, [
|
|
159
|
-
n("div", he, x(l), 1)
|
|
160
|
-
])), 64))
|
|
161
|
-
]),
|
|
162
|
-
n("div", ye, [
|
|
163
|
-
(c(!0), v(F, null, T(J.value, (l) => (c(), v("div", {
|
|
164
|
-
key: l.key,
|
|
165
|
-
style: { width: "14.28%" },
|
|
166
|
-
class: "px-1 mb-1"
|
|
167
|
-
}, [
|
|
168
|
-
n("div", {
|
|
169
|
-
onClick: (I) => G(l),
|
|
170
|
-
class: $(["cursor-pointer text-center text-sm rounded leading-loose transition ease-in-out duration-100", {
|
|
171
|
-
"hover:bg-hover": !l.selected,
|
|
172
|
-
"color-unfocused-text": l.overflow !== 0,
|
|
173
|
-
"border border-caipira-primary-inverted": l.isToday,
|
|
174
|
-
"color-caipira-primary bg-caipira-primary-inverted": l.selected
|
|
175
|
-
}])
|
|
176
|
-
}, x(l.day), 11, ge)
|
|
177
|
-
]))), 128))
|
|
178
|
-
])
|
|
179
|
-
], 512), [
|
|
180
|
-
[ne, y.value]
|
|
181
|
-
])
|
|
182
|
-
], 512);
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
export {
|
|
187
|
-
ke as _
|
|
188
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { defineComponent as p, mergeModels as c, useModel as m, watch as v, resolveComponent as f, openBlock as b, createElementBlock as _, createVNode as g, withDirectives as x, createElementVNode as N, vModelText as h } from "vue";
|
|
2
|
-
const y = {
|
|
3
|
-
options: {
|
|
4
|
-
precision: 2
|
|
5
|
-
},
|
|
6
|
-
inputToPriceNumber(i) {
|
|
7
|
-
return i = i.replace(/[^0-9]/g, "").trim(), i ? parseFloat(i) / Math.pow(10, this.options.precision) : void 0;
|
|
8
|
-
}
|
|
9
|
-
}, I = { class: "flex h-9 w-full input-bg-color input-text-color border input-border input-roundness" }, M = ["disabled"], T = /* @__PURE__ */ p({
|
|
10
|
-
name: "TInputPrice",
|
|
11
|
-
inheritAttrs: !1,
|
|
12
|
-
__name: "InputPrice",
|
|
13
|
-
props: /* @__PURE__ */ c({
|
|
14
|
-
resource: { type: Function },
|
|
15
|
-
disabled: { type: Boolean }
|
|
16
|
-
}, {
|
|
17
|
-
modelValue: {
|
|
18
|
-
default: {
|
|
19
|
-
iso: "",
|
|
20
|
-
value: void 0
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
modelModifiers: {}
|
|
24
|
-
}),
|
|
25
|
-
emits: ["update:modelValue"],
|
|
26
|
-
setup(i, { emit: n }) {
|
|
27
|
-
const t = m(i, "modelValue"), r = i, u = (e) => ({
|
|
28
|
-
label: e.symbol,
|
|
29
|
-
value: e.iso
|
|
30
|
-
}), a = (e, o) => {
|
|
31
|
-
if (o === void 0) {
|
|
32
|
-
t.value = { ...t.value };
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
e?.value && e.value !== o?.value && (t.value.value = e.value), e?.iso && e.iso !== o?.iso && (t.value.iso = e.iso);
|
|
36
|
-
}, d = (e) => {
|
|
37
|
-
const l = e.target.value;
|
|
38
|
-
return t.value.value = y.inputToPriceNumber(l), !1;
|
|
39
|
-
};
|
|
40
|
-
return v(t, a, { immediate: !0 }), (e, o) => {
|
|
41
|
-
const l = f("t-input-select");
|
|
42
|
-
return b(), _("div", I, [
|
|
43
|
-
g(l, {
|
|
44
|
-
modelValue: t.value.iso,
|
|
45
|
-
"onUpdate:modelValue": o[0] || (o[0] = (s) => t.value.iso = s),
|
|
46
|
-
resource: r.resource,
|
|
47
|
-
mapper: u,
|
|
48
|
-
"disable-style": !0,
|
|
49
|
-
class: "w-20 flex justify-center items-center border-r input-border"
|
|
50
|
-
}, null, 8, ["modelValue", "resource"]),
|
|
51
|
-
x(N("input", {
|
|
52
|
-
"onUpdate:modelValue": o[1] || (o[1] = (s) => t.value.value = s),
|
|
53
|
-
type: "text",
|
|
54
|
-
class: "w-full input-bg-color input-text-color input-outline input-roundness input-padding",
|
|
55
|
-
disabled: r.disabled,
|
|
56
|
-
onInput: d
|
|
57
|
-
}, null, 40, M), [
|
|
58
|
-
[h, t.value.value]
|
|
59
|
-
])
|
|
60
|
-
]);
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
export {
|
|
65
|
-
T as _
|
|
66
|
-
};
|