@agrotools1/at-components 2.0.27 → 2.0.29
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/button-new/ButtonNew.vue.d.ts +42 -0
- package/dist/button-new/ButtonNew.vue.d.ts.map +1 -0
- package/dist/button-new/ButtonNew.vue.js +131 -0
- package/dist/button-new/ButtonNew.vue2.js +4 -0
- package/dist/button-new/index.d.ts +3 -0
- package/dist/button-new/index.d.ts.map +1 -0
- package/dist/button-new/index.js +9 -0
- package/dist/button-new/variants.d.ts +66 -0
- package/dist/button-new/variants.d.ts.map +1 -0
- package/dist/button-new/variants.js +74 -0
- package/dist/changelog/versions/components/index.d.ts.map +1 -1
- package/dist/changelog/versions/components/v2.0.28.d.ts +4 -0
- package/dist/changelog/versions/components/v2.0.28.d.ts.map +1 -0
- package/dist/changelog/versions/components/v2.0.29.d.ts +4 -0
- package/dist/changelog/versions/components/v2.0.29.d.ts.map +1 -0
- package/dist/date-picker/DatePicker.vue.d.ts +5 -0
- package/dist/date-picker/DatePicker.vue.d.ts.map +1 -1
- package/dist/date-picker/DatePicker.vue.js +29 -27
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +459 -451
- package/dist/node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/loader-circle.js +13 -0
- package/package.json +11 -9
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PrimitiveProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
import { ButtonNewVariantType, ButtonNewVariantsProps } from './variants';
|
|
4
|
+
export interface ButtonNewProps extends PrimitiveProps {
|
|
5
|
+
variant?: ButtonNewVariantType;
|
|
6
|
+
size?: ButtonNewVariantsProps['size'];
|
|
7
|
+
title?: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
hideLeftIcon?: boolean;
|
|
10
|
+
hideRightIcon?: boolean;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
class?: HTMLAttributes['class'];
|
|
14
|
+
}
|
|
15
|
+
declare function __VLS_template(): {
|
|
16
|
+
attrs: Partial<{}>;
|
|
17
|
+
slots: {
|
|
18
|
+
left?(_: {}): any;
|
|
19
|
+
default?(_: {}): any;
|
|
20
|
+
right?(_: {}): any;
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
rootEl: any;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: import('vue').DefineComponent<ButtonNewProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonNewProps> & Readonly<{}>, {
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
as: import('reka-ui').AsTag | import('vue').Component;
|
|
29
|
+
size: "default" | "sm" | null;
|
|
30
|
+
variant: ButtonNewVariantType;
|
|
31
|
+
loading: boolean;
|
|
32
|
+
hideLeftIcon: boolean;
|
|
33
|
+
hideRightIcon: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
36
|
+
export default _default;
|
|
37
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
38
|
+
new (): {
|
|
39
|
+
$slots: S;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=ButtonNew.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonNew.vue.d.ts","sourceRoot":"","sources":["../../src/button-new/ButtonNew.vue"],"names":[],"mappings":"AA4JA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AACxD,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAInD,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAA;AAEnB,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,IAAI,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;CAChC;AAkDD,iBAAS,cAAc;WA0KT,OAAO,IAA6B;;sBAZxB,GAAG;yBACC,GAAG;uBACL,GAAG;;;;EAe9B;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;cArPR,OAAO;;;aAPR,oBAAoB;aAMpB,OAAO;kBAFF,OAAO;mBACN,OAAO;6EA+PvB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { defineComponent as p, computed as g, createBlock as r, openBlock as i, unref as t, normalizeClass as l, withCtx as c, renderSlot as f, createElementBlock as d, createCommentVNode as o, Fragment as y, toDisplayString as m, createVNode as v } from "vue";
|
|
2
|
+
import { cn as n } from "../lib/utils.js";
|
|
3
|
+
import { AtPlusSolidIcon as b, AtAngleRightSolidIcon as k } from "@agrotools1/at-icons";
|
|
4
|
+
import { Primitive as w } from "reka-ui";
|
|
5
|
+
import "../button/index.js";
|
|
6
|
+
import { resolveButtonNewTheme as z, buttonNewVariants as B } from "./variants.js";
|
|
7
|
+
import C from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/loader-circle.js";
|
|
8
|
+
import I from "../button/Button.vue.js";
|
|
9
|
+
const j = /* @__PURE__ */ p({
|
|
10
|
+
__name: "ButtonNew",
|
|
11
|
+
props: {
|
|
12
|
+
variant: { default: "default" },
|
|
13
|
+
size: { default: "default" },
|
|
14
|
+
title: {},
|
|
15
|
+
subtitle: {},
|
|
16
|
+
hideLeftIcon: { type: Boolean, default: !1 },
|
|
17
|
+
hideRightIcon: { type: Boolean, default: !1 },
|
|
18
|
+
loading: { type: Boolean, default: !1 },
|
|
19
|
+
disabled: { type: Boolean, default: !1 },
|
|
20
|
+
class: {},
|
|
21
|
+
asChild: { type: Boolean },
|
|
22
|
+
as: { default: "button" }
|
|
23
|
+
},
|
|
24
|
+
setup(h) {
|
|
25
|
+
const a = h, s = g(() => {
|
|
26
|
+
const e = a.variant ?? "default", u = z(e);
|
|
27
|
+
return {
|
|
28
|
+
variant: e,
|
|
29
|
+
theme: u,
|
|
30
|
+
iconVariant: e,
|
|
31
|
+
left: {
|
|
32
|
+
show: a.loading || !a.hideLeftIcon
|
|
33
|
+
},
|
|
34
|
+
right: {
|
|
35
|
+
show: !a.hideRightIcon
|
|
36
|
+
},
|
|
37
|
+
content: {
|
|
38
|
+
show: !!a.title || !!a.subtitle,
|
|
39
|
+
theme: u
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
return (e, u) => (i(), r(t(w), {
|
|
44
|
+
as: e.as,
|
|
45
|
+
"as-child": e.asChild,
|
|
46
|
+
disabled: e.disabled,
|
|
47
|
+
class: l(
|
|
48
|
+
t(n)(
|
|
49
|
+
t(B)({ variant: a.variant, size: a.size }),
|
|
50
|
+
a.subtitle ? "py-3" : "py-2",
|
|
51
|
+
a.class
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
}, {
|
|
55
|
+
default: c(() => [
|
|
56
|
+
f(e.$slots, "left", {}, () => [
|
|
57
|
+
s.value.left.show ? (i(), d(y, { key: 0 }, [
|
|
58
|
+
e.loading ? (i(), r(t(C), {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: "size-3.5 animate-spin"
|
|
61
|
+
})) : (i(), r(t(b), {
|
|
62
|
+
key: 1,
|
|
63
|
+
size: "20",
|
|
64
|
+
class: l(
|
|
65
|
+
t(n)(
|
|
66
|
+
"shrink-0 transition-colors duration-200",
|
|
67
|
+
e.disabled ? "text-gray-400" : s.value.theme.leftIcon
|
|
68
|
+
)
|
|
69
|
+
),
|
|
70
|
+
"aria-hidden": "true"
|
|
71
|
+
}, null, 8, ["class"]))
|
|
72
|
+
], 64)) : o("", !0)
|
|
73
|
+
]),
|
|
74
|
+
f(e.$slots, "default", {}, () => [
|
|
75
|
+
s.value.content.show ? (i(), d("div", {
|
|
76
|
+
key: 0,
|
|
77
|
+
class: l(
|
|
78
|
+
t(n)(
|
|
79
|
+
"flex min-w-0 flex-1 flex-col items-start justify-center text-left shrink-0",
|
|
80
|
+
s.value.content.theme.contentContainer
|
|
81
|
+
)
|
|
82
|
+
)
|
|
83
|
+
}, [
|
|
84
|
+
e.title ? (i(), d("span", {
|
|
85
|
+
key: 0,
|
|
86
|
+
class: l(
|
|
87
|
+
t(n)(
|
|
88
|
+
"truncate text-md font-semibold tracking-tight",
|
|
89
|
+
e.disabled ? "text-gray-400" : s.value.content.theme.title
|
|
90
|
+
)
|
|
91
|
+
)
|
|
92
|
+
}, m(e.title), 3)) : o("", !0),
|
|
93
|
+
e.subtitle ? (i(), d("span", {
|
|
94
|
+
key: 1,
|
|
95
|
+
class: l(
|
|
96
|
+
t(n)(
|
|
97
|
+
"text-sm font-bold font-nunito leading-5",
|
|
98
|
+
e.disabled ? "text-gray-400/80" : s.value.content.theme.subtitle
|
|
99
|
+
)
|
|
100
|
+
)
|
|
101
|
+
}, m(e.subtitle), 3)) : o("", !0)
|
|
102
|
+
], 2)) : o("", !0)
|
|
103
|
+
]),
|
|
104
|
+
f(e.$slots, "right", {}, () => [
|
|
105
|
+
s.value.right.show ? (i(), r(t(I), {
|
|
106
|
+
key: 0,
|
|
107
|
+
as: "span",
|
|
108
|
+
size: "icon",
|
|
109
|
+
variant: s.value.iconVariant,
|
|
110
|
+
class: l(
|
|
111
|
+
t(n)(
|
|
112
|
+
"pointer-events-none !size-7 shrink-0 !p-0 [&_svg]:size-5",
|
|
113
|
+
e.disabled && "!bg-gray-300 !text-gray-500"
|
|
114
|
+
)
|
|
115
|
+
),
|
|
116
|
+
"aria-hidden": "true"
|
|
117
|
+
}, {
|
|
118
|
+
default: c(() => [
|
|
119
|
+
v(t(k), { size: "16" })
|
|
120
|
+
]),
|
|
121
|
+
_: 1
|
|
122
|
+
}, 8, ["variant", "class"])) : o("", !0)
|
|
123
|
+
])
|
|
124
|
+
]),
|
|
125
|
+
_: 3
|
|
126
|
+
}, 8, ["as", "as-child", "disabled", "class"]));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
j as default
|
|
131
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button-new/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9E,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as o } from "./ButtonNew.vue.js";
|
|
2
|
+
import { buttonNewDefaultTheme as n, buttonNewThemes as r, buttonNewVariants as a, resolveButtonNewTheme as m } from "./variants.js";
|
|
3
|
+
export {
|
|
4
|
+
o as AgtButtonNew,
|
|
5
|
+
n as buttonNewDefaultTheme,
|
|
6
|
+
r as buttonNewThemes,
|
|
7
|
+
a as buttonNewVariants,
|
|
8
|
+
m as resolveButtonNewTheme
|
|
9
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
/**
|
|
3
|
+
* Variacoes especificas do ButtonNew
|
|
4
|
+
*/
|
|
5
|
+
export declare const buttonNewThemes: {
|
|
6
|
+
readonly default: {
|
|
7
|
+
readonly root: "bg-[var(--background-tertiary-light,#EFE8F9)] hover:opacity-90";
|
|
8
|
+
readonly iconWrap: "bg-[var(--background-primary,#550073)] text-neutral-100";
|
|
9
|
+
readonly contentContainer: "gap-1.5";
|
|
10
|
+
readonly leftIcon: "text-[var(--background-primary,#550073)]";
|
|
11
|
+
readonly title: "text-[var(--content-text-black,#101011)]";
|
|
12
|
+
readonly subtitle: "text-[var(--content-text-black,#101011)]";
|
|
13
|
+
};
|
|
14
|
+
readonly destructive: {
|
|
15
|
+
readonly root: "bg-red-500 text-neutral-100 shadow-xs hover:bg-red-600 focus-visible:ring-destructive/24";
|
|
16
|
+
readonly iconWrap: "bg-white/10 border border-white/20 text-white backdrop-blur-sm";
|
|
17
|
+
readonly contentContainer: "gap-1.5";
|
|
18
|
+
readonly leftIcon: "text-white [--icon-inner:#ef4444]";
|
|
19
|
+
readonly title: "text-white font-bold";
|
|
20
|
+
readonly subtitle: "text-white/80";
|
|
21
|
+
};
|
|
22
|
+
readonly outline: {
|
|
23
|
+
readonly root: "text-primary-500 border border-primary bg-background shadow-xs hover:bg-primary-100";
|
|
24
|
+
readonly iconWrap: "bg-[var(--background-primary,#550073)] text-neutral-100";
|
|
25
|
+
readonly contentContainer: "gap-1.5";
|
|
26
|
+
readonly leftIcon: "text-[var(--background-primary,#550073)]";
|
|
27
|
+
readonly title: "text-primary-500";
|
|
28
|
+
readonly subtitle: "text-primary-500/80";
|
|
29
|
+
};
|
|
30
|
+
readonly ghost: {
|
|
31
|
+
readonly root: "text-primary-500 border border-transparent hover:border-primary disabled:bg-none";
|
|
32
|
+
readonly iconWrap: "bg-primary-100 text-primary-600";
|
|
33
|
+
readonly contentContainer: "gap-1.5";
|
|
34
|
+
readonly leftIcon: "text-[var(--background-primary,#550073)]";
|
|
35
|
+
readonly title: "text-primary-500";
|
|
36
|
+
readonly subtitle: "text-primary-500/80";
|
|
37
|
+
};
|
|
38
|
+
readonly link: {
|
|
39
|
+
readonly root: "text-primary-500 underline-offset-4 underline hover:text-secondary-600 disabled:bg-none";
|
|
40
|
+
readonly iconWrap: "bg-transparent text-primary-600";
|
|
41
|
+
readonly contentContainer: "gap-1.5";
|
|
42
|
+
readonly leftIcon: "text-[var(--background-primary,#550073)]";
|
|
43
|
+
readonly title: "text-primary-500";
|
|
44
|
+
readonly subtitle: "text-primary-500/80";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type ButtonNewVariantType = keyof typeof buttonNewThemes;
|
|
48
|
+
/** Tema da variante `default` — único lugar para fallback em todo o módulo. */
|
|
49
|
+
export declare const buttonNewDefaultTheme: {
|
|
50
|
+
readonly root: "bg-[var(--background-tertiary-light,#EFE8F9)] hover:opacity-90";
|
|
51
|
+
readonly iconWrap: "bg-[var(--background-primary,#550073)] text-neutral-100";
|
|
52
|
+
readonly contentContainer: "gap-1.5";
|
|
53
|
+
readonly leftIcon: "text-[var(--background-primary,#550073)]";
|
|
54
|
+
readonly title: "text-[var(--content-text-black,#101011)]";
|
|
55
|
+
readonly subtitle: "text-[var(--content-text-black,#101011)]";
|
|
56
|
+
};
|
|
57
|
+
export declare function resolveButtonNewTheme(variant: ButtonNewVariantType | undefined): (typeof buttonNewThemes)[ButtonNewVariantType];
|
|
58
|
+
/**
|
|
59
|
+
* CVA para o Root do Botão Novo
|
|
60
|
+
*/
|
|
61
|
+
export declare const buttonNewVariants: (props?: ({
|
|
62
|
+
variant?: "link" | "default" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
63
|
+
size?: "default" | "sm" | null | undefined;
|
|
64
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
65
|
+
export type ButtonNewVariantsProps = VariantProps<typeof buttonNewVariants>;
|
|
66
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../src/button-new/variants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEjE;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyClB,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,eAAe,CAAA;AAE/D,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB;;;;;;;CAA0B,CAAA;AAE5D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,oBAAoB,GAAG,SAAS,GACxC,CAAC,OAAO,eAAe,CAAC,CAAC,oBAAoB,CAAC,CAGhD;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;8EAuB7B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
|
2
|
+
const t = {
|
|
3
|
+
default: {
|
|
4
|
+
root: "bg-[var(--background-tertiary-light,#EFE8F9)] hover:opacity-90",
|
|
5
|
+
iconWrap: "bg-[var(--background-primary,#550073)] text-neutral-100",
|
|
6
|
+
contentContainer: "gap-1.5",
|
|
7
|
+
leftIcon: "text-[var(--background-primary,#550073)]",
|
|
8
|
+
title: "text-[var(--content-text-black,#101011)]",
|
|
9
|
+
subtitle: "text-[var(--content-text-black,#101011)]"
|
|
10
|
+
},
|
|
11
|
+
destructive: {
|
|
12
|
+
root: "bg-red-500 text-neutral-100 shadow-xs hover:bg-red-600 focus-visible:ring-destructive/24",
|
|
13
|
+
iconWrap: "bg-white/10 border border-white/20 text-white backdrop-blur-sm",
|
|
14
|
+
contentContainer: "gap-1.5",
|
|
15
|
+
leftIcon: "text-white [--icon-inner:#ef4444]",
|
|
16
|
+
title: "text-white font-bold",
|
|
17
|
+
subtitle: "text-white/80"
|
|
18
|
+
},
|
|
19
|
+
outline: {
|
|
20
|
+
root: "text-primary-500 border border-primary bg-background shadow-xs hover:bg-primary-100",
|
|
21
|
+
iconWrap: "bg-[var(--background-primary,#550073)] text-neutral-100",
|
|
22
|
+
contentContainer: "gap-1.5",
|
|
23
|
+
leftIcon: "text-[var(--background-primary,#550073)]",
|
|
24
|
+
title: "text-primary-500",
|
|
25
|
+
subtitle: "text-primary-500/80"
|
|
26
|
+
},
|
|
27
|
+
ghost: {
|
|
28
|
+
root: "text-primary-500 border border-transparent hover:border-primary disabled:bg-none",
|
|
29
|
+
iconWrap: "bg-primary-100 text-primary-600",
|
|
30
|
+
contentContainer: "gap-1.5",
|
|
31
|
+
leftIcon: "text-[var(--background-primary,#550073)]",
|
|
32
|
+
title: "text-primary-500",
|
|
33
|
+
subtitle: "text-primary-500/80"
|
|
34
|
+
},
|
|
35
|
+
link: {
|
|
36
|
+
root: "text-primary-500 underline-offset-4 underline hover:text-secondary-600 disabled:bg-none",
|
|
37
|
+
iconWrap: "bg-transparent text-primary-600",
|
|
38
|
+
contentContainer: "gap-1.5",
|
|
39
|
+
leftIcon: "text-[var(--background-primary,#550073)]",
|
|
40
|
+
title: "text-primary-500",
|
|
41
|
+
subtitle: "text-primary-500/80"
|
|
42
|
+
}
|
|
43
|
+
}, n = t.default;
|
|
44
|
+
function o(e) {
|
|
45
|
+
return t[e ?? "default"] ?? n;
|
|
46
|
+
}
|
|
47
|
+
const d = r(
|
|
48
|
+
"inline-flex items-center cursor-pointer justify-center gap-2 whitespace-nowrap text-sm leading-3.5 font-semibold transition-all disabled:pointer-events-none disabled:bg-gray-200 disabled:text-gray-700 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/24 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:border-destructive rounded-b-[var(--radii-component-xs,8px)] rounded-t-none min-h-[48px] px-4",
|
|
49
|
+
{
|
|
50
|
+
variants: {
|
|
51
|
+
variant: {
|
|
52
|
+
default: "bg-[var(--background-tertiary-light,#EFE8F9)] hover:opacity-90",
|
|
53
|
+
destructive: "bg-red-500 text-neutral-100 shadow-xs hover:bg-red-600 focus-visible:ring-destructive/24",
|
|
54
|
+
outline: "text-primary-500 border border-primary bg-background shadow-xs hover:bg-primary-100",
|
|
55
|
+
ghost: "text-primary-500 border border-transparent hover:border-primary disabled:bg-none",
|
|
56
|
+
link: "text-primary-500 underline-offset-4 underline hover:text-secondary-600 disabled:bg-none"
|
|
57
|
+
},
|
|
58
|
+
size: {
|
|
59
|
+
default: "py-2",
|
|
60
|
+
sm: "min-h-10"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
variant: "default",
|
|
65
|
+
size: "default"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
export {
|
|
70
|
+
n as buttonNewDefaultTheme,
|
|
71
|
+
t as buttonNewThemes,
|
|
72
|
+
d as buttonNewVariants,
|
|
73
|
+
o as resolveButtonNewTheme
|
|
74
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/changelog/versions/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/changelog/versions/components/index.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,EAAE,WAAW,EAc3C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.0.28.d.ts","sourceRoot":"","sources":["../../../../src/changelog/versions/components/v2.0.28.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,QAAA,MAAM,OAAO,EAAE,WAiBd,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.0.29.d.ts","sourceRoot":"","sources":["../../../../src/changelog/versions/components/v2.0.29.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,QAAA,MAAM,OAAO,EAAE,WA0Bd,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -24,12 +24,17 @@ export interface Props {
|
|
|
24
24
|
* Optional time formatting style
|
|
25
25
|
*/
|
|
26
26
|
timeStyle?: Intl.DateTimeFormatOptions['timeStyle'];
|
|
27
|
+
/**
|
|
28
|
+
* Whether the date picker is disabled
|
|
29
|
+
*/
|
|
30
|
+
disabled?: boolean;
|
|
27
31
|
}
|
|
28
32
|
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
33
|
"update:modelValue": (value: DateValue) => any;
|
|
30
34
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
31
35
|
"onUpdate:modelValue"?: ((value: DateValue) => any) | undefined;
|
|
32
36
|
}>, {
|
|
37
|
+
disabled: boolean;
|
|
33
38
|
locale: string;
|
|
34
39
|
dateStyle: "short" | "long" | "full" | "medium";
|
|
35
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.vue.d.ts","sourceRoot":"","sources":["../../src/date-picker/DatePicker.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.vue.d.ts","sourceRoot":"","sources":["../../src/date-picker/DatePicker.vue"],"names":[],"mappings":"AAkIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAYxD,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAA;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAA;IAEnD;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC,CAAA;IAEnD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;;;;;;cADY,OAAO;YApBT,MAAM;;;AAiOjB,wBASG"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, computed as n, createBlock as f, openBlock as c, unref as a, withCtx as r, createVNode as m, normalizeClass as _, createTextVNode as V, createElementVNode as v, toDisplayString as x, createCommentVNode as h } from "vue";
|
|
2
2
|
import { Time as T } from "../node_modules/.pnpm/@internationalized_date@3.8.2/node_modules/@internationalized/date/dist/CalendarDate.js";
|
|
3
|
-
import { toCalendarDateTime as
|
|
3
|
+
import { toCalendarDateTime as d } from "../node_modules/.pnpm/@internationalized_date@3.8.2/node_modules/@internationalized/date/dist/conversion.js";
|
|
4
4
|
import { getLocalTimeZone as S } from "../node_modules/.pnpm/@internationalized_date@3.8.2/node_modules/@internationalized/date/dist/queries.js";
|
|
5
5
|
import { DateFormatter as C } from "../node_modules/.pnpm/@internationalized_date@3.8.2/node_modules/@internationalized/date/dist/DateFormatter.js";
|
|
6
6
|
import { cn as g } from "../lib/utils.js";
|
|
7
7
|
import "../button/index.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import B from "../calendar/Calendar.vue.js";
|
|
9
|
+
import D from "../popover/Popover.vue.js";
|
|
10
|
+
import k from "../popover/PopoverContent.vue.js";
|
|
11
11
|
import N from "../popover/PopoverTrigger.vue.js";
|
|
12
12
|
import j from "../time-picker/TimePicker.vue.js";
|
|
13
13
|
import z from "../button/Button.vue.js";
|
|
14
14
|
import U from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/calendar.js";
|
|
15
|
-
const E = { class: "absolute inset-y-0 end-0 flex items-center justify-center px-2.5" }, O = /* @__PURE__ */
|
|
15
|
+
const E = { class: "absolute inset-y-0 end-0 flex items-center justify-center px-2.5" }, O = /* @__PURE__ */ $({
|
|
16
16
|
__name: "DatePicker",
|
|
17
17
|
props: {
|
|
18
18
|
modelValue: {},
|
|
@@ -20,16 +20,17 @@ const E = { class: "absolute inset-y-0 end-0 flex items-center justify-center px
|
|
|
20
20
|
locale: { default: "pt-BR" },
|
|
21
21
|
enableTime: { type: Boolean },
|
|
22
22
|
dateStyle: { default: "short" },
|
|
23
|
-
timeStyle: {}
|
|
23
|
+
timeStyle: {},
|
|
24
|
+
disabled: { type: Boolean, default: !1 }
|
|
24
25
|
},
|
|
25
26
|
emits: ["update:modelValue"],
|
|
26
|
-
setup(p, { emit:
|
|
27
|
-
const t = p,
|
|
28
|
-
get: () => t.enableTime ?
|
|
27
|
+
setup(p, { emit: b }) {
|
|
28
|
+
const t = p, i = b, l = n({
|
|
29
|
+
get: () => t.enableTime ? d(t.modelValue) : t.modelValue,
|
|
29
30
|
set: (e) => {
|
|
30
|
-
if (!t.enableTime) return
|
|
31
|
-
const o =
|
|
32
|
-
|
|
31
|
+
if (!t.enableTime) return i("update:modelValue", e);
|
|
32
|
+
const o = d(t.modelValue);
|
|
33
|
+
i(
|
|
33
34
|
"update:modelValue",
|
|
34
35
|
o.set({
|
|
35
36
|
day: e.day,
|
|
@@ -39,28 +40,29 @@ const E = { class: "absolute inset-y-0 end-0 flex items-center justify-center px
|
|
|
39
40
|
})
|
|
40
41
|
);
|
|
41
42
|
}
|
|
42
|
-
}),
|
|
43
|
+
}), u = n({
|
|
43
44
|
get: () => {
|
|
44
|
-
const e =
|
|
45
|
+
const e = d(t.modelValue);
|
|
45
46
|
return new T(e.hour, e.minute);
|
|
46
47
|
},
|
|
47
48
|
set: (e) => {
|
|
48
|
-
const o =
|
|
49
|
-
|
|
49
|
+
const o = d(t.modelValue);
|
|
50
|
+
i("update:modelValue", o.set({ hour: e.hour, minute: e.minute }));
|
|
50
51
|
}
|
|
51
|
-
}),
|
|
52
|
+
}), y = n(
|
|
52
53
|
() => new C(t.locale, {
|
|
53
54
|
dateStyle: t.dateStyle,
|
|
54
55
|
timeStyle: t.timeStyle
|
|
55
56
|
})
|
|
56
57
|
);
|
|
57
|
-
return (e, o) => (c(), f(a(
|
|
58
|
+
return (e, o) => (c(), f(a(D), null, {
|
|
58
59
|
default: r(() => [
|
|
59
60
|
m(a(N), { "as-child": "" }, {
|
|
60
61
|
default: r(() => [
|
|
61
62
|
m(a(z), {
|
|
62
63
|
variant: "outline",
|
|
63
|
-
|
|
64
|
+
disabled: e.disabled,
|
|
65
|
+
class: _(
|
|
64
66
|
a(g)(
|
|
65
67
|
"relative min-w-[280px] justify-start pr-8 text-left font-normal",
|
|
66
68
|
!l.value && "text-muted-foreground"
|
|
@@ -68,28 +70,28 @@ const E = { class: "absolute inset-y-0 end-0 flex items-center justify-center px
|
|
|
68
70
|
)
|
|
69
71
|
}, {
|
|
70
72
|
default: r(() => [
|
|
71
|
-
|
|
73
|
+
V(x(l.value ? y.value.format(l.value.toDate(a(S)())) : e.placeholder) + " ", 1),
|
|
72
74
|
v("span", E, [
|
|
73
75
|
m(a(U), { class: "size-4" })
|
|
74
76
|
])
|
|
75
77
|
]),
|
|
76
78
|
_: 1
|
|
77
|
-
}, 8, ["class"])
|
|
79
|
+
}, 8, ["disabled", "class"])
|
|
78
80
|
]),
|
|
79
81
|
_: 1
|
|
80
82
|
}),
|
|
81
|
-
m(a(
|
|
83
|
+
m(a(k), { class: "w-auto p-0 pb-4" }, {
|
|
82
84
|
default: r(() => [
|
|
83
|
-
m(a(
|
|
85
|
+
m(a(B), {
|
|
84
86
|
modelValue: l.value,
|
|
85
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
87
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => l.value = s),
|
|
86
88
|
locale: t.locale,
|
|
87
89
|
"initial-focus": ""
|
|
88
90
|
}, null, 8, ["modelValue", "locale"]),
|
|
89
91
|
e.enableTime ? (c(), f(a(j), {
|
|
90
92
|
key: 0,
|
|
91
|
-
modelValue:
|
|
92
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
93
|
+
modelValue: u.value,
|
|
94
|
+
"onUpdate:modelValue": o[1] || (o[1] = (s) => u.value = s),
|
|
93
95
|
class: "justify-center"
|
|
94
96
|
}, null, 8, ["modelValue"])) : h("", !0)
|
|
95
97
|
]),
|