@caipira/tamandua 0.0.64 → 0.0.66
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/Avatar.js +2 -2
- package/dist/{Avatar.vue_vue_type_script_setup_true_lang-BbcM5CB3.js → Avatar.vue_vue_type_script_setup_true_lang-D7NdR9hu.js} +1 -1
- package/dist/Button.js +2 -2
- package/dist/{Button-BThdMs5-.js → Button.vue_vue_type_script_setup_true_lang-CUPz7wT9.js} +81 -79
- package/dist/FileDrop.js +2 -2
- package/dist/{FileDrop.vue_vue_type_script_setup_true_lang-DLEH_LLX.js → FileDrop.vue_vue_type_script_setup_true_lang-BDzMbrCN.js} +26 -26
- package/dist/GraphyPrice.js +2 -2
- package/dist/{GraphyPrice.vue_vue_type_script_setup_true_lang-DI2x-MAS.js → GraphyPrice.vue_vue_type_script_setup_true_lang-BDYxfzF6.js} +1 -1
- package/dist/Icon.js +2 -2
- package/dist/{Icon.vue_vue_type_script_setup_true_lang-CDJweTzy.js → Icon.vue_vue_type_script_setup_true_lang-C2QvF2xM.js} +1 -1
- package/dist/InputCheckbox.js +2 -2
- package/dist/{InputCheckbox.vue_vue_type_style_index_0_lang-BOY41cD-.js → InputCheckbox.vue_vue_type_style_index_0_lang-Dp-FyMon.js} +9 -9
- package/dist/InputRadio.js +2 -2
- package/dist/InputRadio.vue_vue_type_style_index_0_lang-n0nJwz8x.js +35 -0
- package/dist/InputSelect.js +2 -2
- package/dist/{InputSelect.vue_vue_type_script_setup_true_lang-W2S_TcOu.js → InputSelect.vue_vue_type_script_setup_true_lang-BuO105oW.js} +1 -1
- package/dist/InputSwitch.js +2 -2
- package/dist/{InputSwitch.vue_vue_type_script_setup_true_lang-Q3wQlqfk.js → InputSwitch.vue_vue_type_script_setup_true_lang-CgE_12vY.js} +10 -11
- package/dist/Link.js +2 -2
- package/dist/{Link.vue_vue_type_script_setup_true_lang-DIzaFPvW.js → Link.vue_vue_type_script_setup_true_lang-BE-Gh_jJ.js} +1 -1
- package/dist/Pagination.js +2 -2
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-BB6dLKpi.js +106 -0
- package/dist/Popconfirm.js +2 -2
- package/dist/{Popconfirm.vue_vue_type_script_setup_true_lang-CgWeJEGu.js → Popconfirm.vue_vue_type_script_setup_true_lang-C37pLEUq.js} +1 -1
- package/dist/Popover.js +2 -2
- package/dist/{Popover.vue_vue_type_script_setup_true_lang-MaJDdAe0.js → Popover.vue_vue_type_script_setup_true_lang-DoSN5ymu.js} +6 -6
- package/dist/Tag.js +2 -2
- package/dist/{Tag.vue_vue_type_script_setup_true_lang-CkDz2_qz.js → Tag.vue_vue_type_script_setup_true_lang-CKzb-As0.js} +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toast.vue_vue_type_script_setup_true_lang-Lw1lJoH3.js → Toast.vue_vue_type_script_setup_true_lang-DcVS4Iyg.js} +1 -1
- package/dist/components.js +20 -20
- package/dist/enums.js +1 -1
- package/dist/index.css +18 -25
- package/dist/{plugin-BU44OLnf.js → plugin-2Cr_XUjp.js} +1 -1
- package/dist/{plugin-BZOU6h10.js → plugin-B63n9_uc.js} +1 -1
- package/dist/{plugin-6ziw5jJj.js → plugin-BShPzL82.js} +1 -1
- package/dist/{plugin-BQqeQUxM.js → plugin-BVJKxqmv.js} +1 -1
- package/dist/{plugin-BOewyU0C.js → plugin-BdTrCTL4.js} +1 -1
- package/dist/{plugin-Bw-AW29_.js → plugin-CEByTREY.js} +1 -1
- package/dist/{plugin-aR9suX-A.js → plugin-CGE6W117.js} +1 -1
- package/dist/{plugin-BscWXR9h.js → plugin-CJ6sqqaI.js} +1 -1
- package/dist/{plugin-hcORPz_I.js → plugin-ColpxTKB.js} +1 -1
- package/dist/plugin-Cr3oXX-8.js +10 -0
- package/dist/{plugin-B5vbbM7n.js → plugin-DJlVAL-g.js} +1 -1
- package/dist/{plugin-DqD4mnko.js → plugin-DNwjBl_u.js} +1 -1
- package/dist/{plugin-CZiSoM73.js → plugin-DPAnsB4s.js} +1 -1
- package/dist/{plugin-Y4yYnlO3.js → plugin-Do2-cqMT.js} +1 -1
- package/dist/{plugin-DPcsc5tO.js → plugin-DxG6Hhao.js} +1 -1
- package/dist/{plugins-CXIwZwnV.js → plugins-BFVTdy-_.js} +26 -26
- package/dist/plugins.js +26 -26
- package/dist/tamandua.js +1 -1
- package/dist/types/components/Button/Button.vue.d.ts +23 -17
- package/dist/types/components/Button/types.d.ts +15 -13
- package/dist/types/components/InputSelect/InputSelect.vue.d.ts +6 -6
- package/dist/{ui-BSiRZzeZ.js → ui-J-lhC9qd.js} +2 -2
- package/package.json +1 -1
- package/dist/Button.css +0 -1
- package/dist/InputRadio.vue_vue_type_style_index_0_lang-DusKEybQ.js +0 -35
- package/dist/Pagination.vue_vue_type_script_setup_true_lang-BNeFZWgA.js +0 -108
- package/dist/plugin-BoP2-VzO.js +0 -10
package/dist/plugins.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./Avatar.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import { p as C } from "./plugin-
|
|
1
|
+
import "./Avatar.vue_vue_type_script_setup_true_lang-D7NdR9hu.js";
|
|
2
|
+
import { p as C } from "./plugin-DNwjBl_u.js";
|
|
3
3
|
import "vue";
|
|
4
4
|
import { p as b } from "./plugin-C-iGigb_.js";
|
|
5
|
-
import "./Button-
|
|
6
|
-
import { p as S } from "./plugin-
|
|
5
|
+
import "./Button.vue_vue_type_script_setup_true_lang-CUPz7wT9.js";
|
|
6
|
+
import { p as S } from "./plugin-Cr3oXX-8.js";
|
|
7
7
|
import "./transform-DSaNEFMr.js";
|
|
8
8
|
import "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
|
|
9
9
|
import { p as v } from "./plugin-DDXOF4cU.js";
|
|
@@ -11,21 +11,21 @@ import { p as D } from "./plugin-CyDnzy2n.js";
|
|
|
11
11
|
import "./Drawer-Cl9_4uHA.js";
|
|
12
12
|
import { p as L } from "./plugin-CNwzCYlr.js";
|
|
13
13
|
import { p as A } from "./plugin-DrKx8l8j.js";
|
|
14
|
-
import { p as E } from "./plugin-
|
|
14
|
+
import { p as E } from "./plugin-CJ6sqqaI.js";
|
|
15
15
|
import "./Form.vue_vue_type_script_setup_true_lang-CNGNCak7.js";
|
|
16
16
|
import { p as j } from "./plugin-BuU0zOfE.js";
|
|
17
17
|
import { p as z } from "./plugin-CvohbpUQ.js";
|
|
18
18
|
import { p as J } from "./plugin-Buc7eEox.js";
|
|
19
19
|
import { p as N } from "./plugin-CC97Vx-s.js";
|
|
20
|
-
import "./GraphyPrice.vue_vue_type_script_setup_true_lang-
|
|
21
|
-
import { p as Q } from "./plugin-
|
|
20
|
+
import "./GraphyPrice.vue_vue_type_script_setup_true_lang-BDYxfzF6.js";
|
|
21
|
+
import { p as Q } from "./plugin-CGE6W117.js";
|
|
22
22
|
import { p as V } from "./plugin-F3dxY_wr.js";
|
|
23
23
|
import { p as X } from "./plugin-DOeDaXWj.js";
|
|
24
|
-
import "./Icon.vue_vue_type_script_setup_true_lang-
|
|
25
|
-
import { p as Z } from "./plugin-
|
|
24
|
+
import "./Icon.vue_vue_type_script_setup_true_lang-C2QvF2xM.js";
|
|
25
|
+
import { p as Z } from "./plugin-BShPzL82.js";
|
|
26
26
|
import { p as $ } from "./plugin--F5QK2vy.js";
|
|
27
|
-
import "./InputCheckbox.vue_vue_type_style_index_0_lang-
|
|
28
|
-
import { p as or } from "./plugin-
|
|
27
|
+
import "./InputCheckbox.vue_vue_type_style_index_0_lang-Dp-FyMon.js";
|
|
28
|
+
import { p as or } from "./plugin-BVJKxqmv.js";
|
|
29
29
|
import { p as tr } from "./plugin-Bq4nQPd4.js";
|
|
30
30
|
import { p as er } from "./plugin-D9KHvOM3.js";
|
|
31
31
|
import { p as nr } from "./plugin-Ch67LOIy.js";
|
|
@@ -33,22 +33,22 @@ import { p as ur } from "./plugin-Br-QOjhk.js";
|
|
|
33
33
|
import { p as Pr } from "./plugin-BJyDH94F.js";
|
|
34
34
|
import { p as gr } from "./plugin-CrHDShgh.js";
|
|
35
35
|
import { p as fr } from "./plugin-RM2wZuwL.js";
|
|
36
|
-
import "./InputRadio.vue_vue_type_style_index_0_lang-
|
|
37
|
-
import { p as cr } from "./plugin-
|
|
38
|
-
import "./InputSelect.vue_vue_type_script_setup_true_lang-
|
|
39
|
-
import { p as yr } from "./plugin-
|
|
40
|
-
import { p as Cr } from "./plugin-
|
|
36
|
+
import "./InputRadio.vue_vue_type_style_index_0_lang-n0nJwz8x.js";
|
|
37
|
+
import { p as cr } from "./plugin-Do2-cqMT.js";
|
|
38
|
+
import "./InputSelect.vue_vue_type_script_setup_true_lang-BuO105oW.js";
|
|
39
|
+
import { p as yr } from "./plugin-DPAnsB4s.js";
|
|
40
|
+
import { p as Cr } from "./plugin-B63n9_uc.js";
|
|
41
41
|
import { p as br } from "./plugin-lYDlOt8p.js";
|
|
42
42
|
import { p as Sr } from "./plugin-C8Z-XgLn.js";
|
|
43
|
-
import "./Link.vue_vue_type_script_setup_true_lang-
|
|
44
|
-
import { p as vr } from "./plugin-
|
|
43
|
+
import "./Link.vue_vue_type_script_setup_true_lang-BE-Gh_jJ.js";
|
|
44
|
+
import { p as vr } from "./plugin-CEByTREY.js";
|
|
45
45
|
import { p as Dr } from "./plugin-dX-bbpm5.js";
|
|
46
46
|
import { p as Lr } from "./plugin-DNXazWwT.js";
|
|
47
|
-
import { p as Ar } from "./plugin-
|
|
48
|
-
import "./Popconfirm.vue_vue_type_script_setup_true_lang-
|
|
49
|
-
import { p as Er } from "./plugin-
|
|
50
|
-
import "./Popover.vue_vue_type_script_setup_true_lang-
|
|
51
|
-
import { p as jr } from "./plugin-
|
|
47
|
+
import { p as Ar } from "./plugin-DxG6Hhao.js";
|
|
48
|
+
import "./Popconfirm.vue_vue_type_script_setup_true_lang-C37pLEUq.js";
|
|
49
|
+
import { p as Er } from "./plugin-2Cr_XUjp.js";
|
|
50
|
+
import "./Popover.vue_vue_type_script_setup_true_lang-DoSN5ymu.js";
|
|
51
|
+
import { p as jr } from "./plugin-ColpxTKB.js";
|
|
52
52
|
import "./ProgressCircle-Cpmi2CpO.js";
|
|
53
53
|
import { p as zr } from "./plugin-MAzqwXys.js";
|
|
54
54
|
import "./ProgressLine-CTS0VOAI.js";
|
|
@@ -58,9 +58,9 @@ import { p as Qr } from "./plugin-C1kAmMfE.js";
|
|
|
58
58
|
import { p as Vr } from "./plugin-wVt0wQNv.js";
|
|
59
59
|
import "./Table-vjjmPzlZ.js";
|
|
60
60
|
import { p as Xr } from "./plugin-6KewRQ9w.js";
|
|
61
|
-
import "./Tag.vue_vue_type_script_setup_true_lang-
|
|
62
|
-
import { p as Zr } from "./plugin-
|
|
63
|
-
import { p as $r } from "./plugin-
|
|
61
|
+
import "./Tag.vue_vue_type_script_setup_true_lang-CKzb-As0.js";
|
|
62
|
+
import { p as Zr } from "./plugin-DJlVAL-g.js";
|
|
63
|
+
import { p as $r } from "./plugin-BdTrCTL4.js";
|
|
64
64
|
export {
|
|
65
65
|
C as AvatarPlugin,
|
|
66
66
|
b as BackdropPlugin,
|
package/dist/tamandua.js
CHANGED
|
@@ -5,17 +5,19 @@ declare function __VLS_template(): {
|
|
|
5
5
|
default?(_: {}): any;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
|
|
8
|
+
bold: boolean;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
hover: boolean;
|
|
8
11
|
href: string;
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
iconPosition: string;
|
|
13
|
+
iconProps: () => {};
|
|
11
14
|
label: string;
|
|
15
|
+
multiple: boolean;
|
|
16
|
+
outline: boolean;
|
|
12
17
|
shape: ElementShape;
|
|
13
|
-
|
|
18
|
+
size: ElementSize;
|
|
19
|
+
type: ButtonType;
|
|
14
20
|
variant: ButtonVariant;
|
|
15
|
-
outline: boolean;
|
|
16
|
-
multiple: boolean;
|
|
17
|
-
disabled: boolean;
|
|
18
|
-
iconProps: () => {};
|
|
19
21
|
}>, {
|
|
20
22
|
iconReference: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
21
23
|
icon: {
|
|
@@ -77,17 +79,19 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
77
79
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
78
80
|
upload: (val: FileList) => void;
|
|
79
81
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ButtonProps>, {
|
|
82
|
+
bold: boolean;
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
hover: boolean;
|
|
80
85
|
href: string;
|
|
81
|
-
|
|
82
|
-
|
|
86
|
+
iconPosition: string;
|
|
87
|
+
iconProps: () => {};
|
|
83
88
|
label: string;
|
|
89
|
+
multiple: boolean;
|
|
90
|
+
outline: boolean;
|
|
84
91
|
shape: ElementShape;
|
|
85
|
-
|
|
92
|
+
size: ElementSize;
|
|
93
|
+
type: ButtonType;
|
|
86
94
|
variant: ButtonVariant;
|
|
87
|
-
outline: boolean;
|
|
88
|
-
multiple: boolean;
|
|
89
|
-
disabled: boolean;
|
|
90
|
-
iconProps: () => {};
|
|
91
95
|
}>>> & {
|
|
92
96
|
onUpload?: ((val: FileList) => any) | undefined;
|
|
93
97
|
}, {
|
|
@@ -95,14 +99,16 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
95
99
|
size: `${ElementSize}`;
|
|
96
100
|
shape: `${ElementShape}`;
|
|
97
101
|
type: `${ButtonType}`;
|
|
102
|
+
bold: boolean;
|
|
98
103
|
label: string;
|
|
99
|
-
variant: `${ButtonVariant}`;
|
|
100
|
-
outline: boolean;
|
|
101
|
-
multiple: boolean;
|
|
102
104
|
disabled: boolean;
|
|
105
|
+
iconPosition: "left" | "right";
|
|
103
106
|
iconProps: Partial<import("../types.js").IconProps> & {
|
|
104
107
|
class?: string;
|
|
105
108
|
};
|
|
109
|
+
multiple: boolean;
|
|
110
|
+
outline: boolean;
|
|
111
|
+
variant: `${ButtonVariant}`;
|
|
106
112
|
}, {}>;
|
|
107
113
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
108
114
|
export default _default;
|
|
@@ -2,25 +2,27 @@ import { Icon, ButtonType, ElementSize, ElementShape, ButtonVariant } from '../.
|
|
|
2
2
|
import { IconProps } from '../Icon/types.js';
|
|
3
3
|
|
|
4
4
|
export type ButtonProps = {
|
|
5
|
-
icon?: `${Icon}`;
|
|
6
|
-
type?: `${ButtonType}`;
|
|
7
|
-
size?: `${ElementSize}`;
|
|
8
|
-
label?: string;
|
|
9
|
-
shape?: `${ElementShape}`;
|
|
10
|
-
hover?: boolean;
|
|
11
|
-
variant?: `${ButtonVariant}`;
|
|
12
|
-
outline?: boolean;
|
|
13
|
-
multiple?: boolean;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
iconProps?: Partial<IconProps> & {
|
|
16
|
-
class?: string;
|
|
17
|
-
};
|
|
18
5
|
animate?: {
|
|
19
6
|
target: "icon";
|
|
20
7
|
trigger: "click";
|
|
21
8
|
animation: object;
|
|
22
9
|
reset: object;
|
|
23
10
|
};
|
|
11
|
+
bold?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
hover?: boolean;
|
|
14
|
+
icon?: `${Icon}`;
|
|
15
|
+
iconPosition?: "left" | "right";
|
|
16
|
+
iconProps?: Partial<IconProps> & {
|
|
17
|
+
class?: string;
|
|
18
|
+
};
|
|
19
|
+
label?: string;
|
|
20
|
+
multiple?: boolean;
|
|
21
|
+
outline?: boolean;
|
|
22
|
+
shape?: `${ElementShape}`;
|
|
23
|
+
size?: `${ElementSize}`;
|
|
24
|
+
type?: `${ButtonType}`;
|
|
25
|
+
variant?: `${ButtonVariant}`;
|
|
24
26
|
};
|
|
25
27
|
export type ButtonEvents = {
|
|
26
28
|
(e: "upload", val: FileList): void;
|
|
@@ -44,12 +44,12 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
44
44
|
type: import("vue").PropType<ElementSize>;
|
|
45
45
|
default: ElementSize;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
disabled: {
|
|
48
48
|
type: import("vue").PropType<boolean>;
|
|
49
|
-
default: boolean;
|
|
50
49
|
};
|
|
51
|
-
|
|
50
|
+
multiple: {
|
|
52
51
|
type: import("vue").PropType<boolean>;
|
|
52
|
+
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
options: {
|
|
55
55
|
type: import("vue").PropType<InputSelectOption[]>;
|
|
@@ -108,12 +108,12 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
|
108
108
|
type: import("vue").PropType<ElementSize>;
|
|
109
109
|
default: ElementSize;
|
|
110
110
|
};
|
|
111
|
-
|
|
111
|
+
disabled: {
|
|
112
112
|
type: import("vue").PropType<boolean>;
|
|
113
|
-
default: boolean;
|
|
114
113
|
};
|
|
115
|
-
|
|
114
|
+
multiple: {
|
|
116
115
|
type: import("vue").PropType<boolean>;
|
|
116
|
+
default: boolean;
|
|
117
117
|
};
|
|
118
118
|
options: {
|
|
119
119
|
type: import("vue").PropType<InputSelectOption[]>;
|
package/package.json
CHANGED
package/dist/Button.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.transparent-hover[data-v-ad1f5bfc]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import './InputRadio.css';
|
|
2
|
-
import { defineComponent as p, inject as r, openBlock as m, createElementBlock as u, createElementVNode as o, unref as a, toDisplayString as b } from "vue";
|
|
3
|
-
const v = { class: "h-9 inline-flex items-center" }, h = ["value", "name", "disabled", "checked"];
|
|
4
|
-
let f = 0;
|
|
5
|
-
const g = /* @__PURE__ */ p({
|
|
6
|
-
name: "TInputRadio",
|
|
7
|
-
__name: "InputRadio",
|
|
8
|
-
props: {
|
|
9
|
-
value: {},
|
|
10
|
-
label: {}
|
|
11
|
-
},
|
|
12
|
-
setup(t) {
|
|
13
|
-
const i = `radio_${++f}`, c = r("name", ""), e = t, l = r("model", ""), d = r("change", () => {
|
|
14
|
-
}), s = r("disabled", !1);
|
|
15
|
-
return (_, n) => (m(), u("div", v, [
|
|
16
|
-
o("input", {
|
|
17
|
-
value: e.value,
|
|
18
|
-
name: a(c),
|
|
19
|
-
id: i,
|
|
20
|
-
disabled: a(s),
|
|
21
|
-
checked: e.value === a(l),
|
|
22
|
-
type: "radio",
|
|
23
|
-
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",
|
|
24
|
-
onChange: n[0] || (n[0] = (y) => a(d)(e.value))
|
|
25
|
-
}, null, 40, h),
|
|
26
|
-
o("label", {
|
|
27
|
-
class: "cursor-pointer pl-2 mr-3 input-label",
|
|
28
|
-
for: i
|
|
29
|
-
}, b(e.label), 1)
|
|
30
|
-
]));
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
g as _
|
|
35
|
-
};
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { defineComponent as C, mergeModels as V, useModel as x, ref as z, computed as o, resolveComponent as h, openBlock as i, createElementBlock as d, toDisplayString as B, createCommentVNode as b, createElementVNode as L, createVNode as y, normalizeClass as p, Fragment as M, renderList as S, createBlock as P } from "vue";
|
|
2
|
-
const D = { class: "flex gap-2 items-center flex-wrap select-none" }, N = {
|
|
3
|
-
key: 0,
|
|
4
|
-
class: "md:block hidden"
|
|
5
|
-
}, E = { class: "h-9 flex" }, T = /* @__PURE__ */ C({
|
|
6
|
-
name: "TPagination",
|
|
7
|
-
__name: "Pagination",
|
|
8
|
-
props: /* @__PURE__ */ V({
|
|
9
|
-
disabled: { type: Boolean, default: !1 },
|
|
10
|
-
hasPageSize: { type: Boolean, default: !0 },
|
|
11
|
-
pageLengths: { default: () => [12, 18, 24, 30, 36, 42] },
|
|
12
|
-
showDescription: { type: Boolean, default: !1 }
|
|
13
|
-
}, {
|
|
14
|
-
modelValue: {
|
|
15
|
-
default: {
|
|
16
|
-
page: 1,
|
|
17
|
-
pages: 1,
|
|
18
|
-
perPage: 12
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
modelModifiers: {}
|
|
22
|
-
}),
|
|
23
|
-
emits: ["update:modelValue"],
|
|
24
|
-
setup(c) {
|
|
25
|
-
const v = c, e = x(c, "modelValue"), m = z(e.value.perPage ?? 12), g = o(() => e.value.page === 1), f = o(
|
|
26
|
-
() => e.value.page === e.value.pages
|
|
27
|
-
), k = o(() => {
|
|
28
|
-
const a = e.value.pages || 1, t = e.value.page || 1, l = [], u = Math.max(2, t - 2), s = Math.min(a - 1, t + 2);
|
|
29
|
-
a > 1 && l.push(1);
|
|
30
|
-
for (let n = u; n <= s; n++)
|
|
31
|
-
n > 1 && n < a && l.push(n);
|
|
32
|
-
return a > 1 && l.push(a), l;
|
|
33
|
-
}), w = o(() => v.pageLengths.map((a) => ({
|
|
34
|
-
label: `${a} / page`,
|
|
35
|
-
value: a
|
|
36
|
-
}))), _ = o(() => {
|
|
37
|
-
if ("items" in e.value && "skip" in e.value && "items" in e.value) {
|
|
38
|
-
const a = e.value.skip + 1, t = e.value.skip + e.value.items, l = e.value.totalItems;
|
|
39
|
-
return `Showing ${a} to ${t} of ${l} entries`;
|
|
40
|
-
}
|
|
41
|
-
return `Page ${e.value.page} of ${e.value.pages}`;
|
|
42
|
-
}), r = (a) => {
|
|
43
|
-
a === e.value.page || a < 1 || a > e.value.pages || (e.value = {
|
|
44
|
-
...e.value,
|
|
45
|
-
page: a
|
|
46
|
-
});
|
|
47
|
-
}, $ = (a) => {
|
|
48
|
-
a !== e.value.perPage && (e.value = {
|
|
49
|
-
...e.value,
|
|
50
|
-
perPage: a,
|
|
51
|
-
page: 1
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
return (a, t) => {
|
|
55
|
-
const l = h("t-button"), u = h("t-input-select");
|
|
56
|
-
return i(), d("div", D, [
|
|
57
|
-
a.showDescription ? (i(), d("div", N, B(_.value), 1)) : b("", !0),
|
|
58
|
-
L("div", E, [
|
|
59
|
-
y(l, {
|
|
60
|
-
size: "sm",
|
|
61
|
-
variant: "primary",
|
|
62
|
-
"disable-style": !0,
|
|
63
|
-
class: p(["h-9 px-2 input-roundness rounded-r-none", { "opacity-50 cursor-not-allowed": g.value }]),
|
|
64
|
-
icon: "chevron-left",
|
|
65
|
-
disabled: g.value,
|
|
66
|
-
onClick: t[0] || (t[0] = (s) => r(e.value.page - 1))
|
|
67
|
-
}, null, 8, ["class", "disabled"]),
|
|
68
|
-
(i(!0), d(M, null, S(k.value, (s) => (i(), P(l, {
|
|
69
|
-
"disable-style": !0,
|
|
70
|
-
label: `${s}`,
|
|
71
|
-
disabled: s === e.value.page,
|
|
72
|
-
class: p([{
|
|
73
|
-
"opacity-50 cursor-not-allowed": s === e.value.page
|
|
74
|
-
}, "h-9 px-2 rounded-none"]),
|
|
75
|
-
size: "sm",
|
|
76
|
-
variant: "primary",
|
|
77
|
-
onClick: (n) => r(s)
|
|
78
|
-
}, null, 8, ["label", "disabled", "class", "onClick"]))), 256)),
|
|
79
|
-
y(l, {
|
|
80
|
-
size: "sm",
|
|
81
|
-
variant: "primary",
|
|
82
|
-
"disable-style": !0,
|
|
83
|
-
class: p(["h-9 px-2 input-roundness rounded-l-none", { "opacity-50 cursor-not-allowed": f.value }]),
|
|
84
|
-
icon: "chevron-right",
|
|
85
|
-
disabled: f.value,
|
|
86
|
-
onClick: t[1] || (t[1] = (s) => r(e.value.page + 1))
|
|
87
|
-
}, null, 8, ["class", "disabled"])
|
|
88
|
-
]),
|
|
89
|
-
v.hasPageSize ? (i(), P(u, {
|
|
90
|
-
key: 1,
|
|
91
|
-
modelValue: m.value,
|
|
92
|
-
"onUpdate:modelValue": [
|
|
93
|
-
t[2] || (t[2] = (s) => m.value = s),
|
|
94
|
-
$
|
|
95
|
-
],
|
|
96
|
-
"width-class": "",
|
|
97
|
-
class: "w-fit min-w-32",
|
|
98
|
-
"dropdown-placement": "top",
|
|
99
|
-
disabled: a.disabled,
|
|
100
|
-
options: w.value
|
|
101
|
-
}, null, 8, ["modelValue", "disabled", "options"])) : b("", !0)
|
|
102
|
-
]);
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
export {
|
|
107
|
-
T as _
|
|
108
|
-
};
|