@appmax_npm/ds-prime 1.0.0-alpha.56 → 1.0.0-alpha.58

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.
@@ -0,0 +1,47 @@
1
+ import { defineComponent as p, openBlock as l, createElementBlock as i, createBlock as r, withCtx as t, createTextVNode as a, toDisplayString as o, createCommentVNode as n, renderSlot as m } from "vue";
2
+ import { _ as s } from "./AmText.vue_vue_type_script_setup_true_lang-BMNozCVT.js";
3
+ const d = { class: "grid gap-1 w-full" }, u = { name: "AmFieldWrapper" }, k = /* @__PURE__ */ p({
4
+ ...u,
5
+ props: {
6
+ label: {},
7
+ error: {},
8
+ help: {}
9
+ },
10
+ setup(c) {
11
+ return (e, _) => (l(), i("label", d, [
12
+ e.label ? (l(), r(s, {
13
+ key: 0,
14
+ as: "span",
15
+ variant: "subtitle"
16
+ }, {
17
+ default: t(() => [
18
+ a(o(e.label), 1)
19
+ ]),
20
+ _: 1
21
+ })) : n("", !0),
22
+ m(e.$slots, "default"),
23
+ e.error ? (l(), r(s, {
24
+ key: 1,
25
+ class: "text-danger",
26
+ size: "small"
27
+ }, {
28
+ default: t(() => [
29
+ a(o(e.error), 1)
30
+ ]),
31
+ _: 1
32
+ })) : e.help ? (l(), r(s, {
33
+ key: 2,
34
+ class: "text-muted-color",
35
+ size: "small"
36
+ }, {
37
+ default: t(() => [
38
+ a(o(e.help), 1)
39
+ ]),
40
+ _: 1
41
+ })) : n("", !0)
42
+ ]));
43
+ }
44
+ });
45
+ export {
46
+ k as _
47
+ };
@@ -0,0 +1,60 @@
1
+ import { defineComponent as a, openBlock as o, createBlock as l, resolveDynamicComponent as n, normalizeClass as r, unref as i, withCtx as m, renderSlot as d } from "vue";
2
+ import { cva as c } from "class-variance-authority";
3
+ import { twMerge as f } from "tailwind-merge";
4
+ const u = c(
5
+ "am-text font-normal text-color text-base [&strong]:font-bold [&>strong]:font-bold",
6
+ {
7
+ variants: {
8
+ variant: {
9
+ caption: "text-xs text-muted-color font-medium",
10
+ body: "text-sm [&strong]:font-medium [&>strong]:font-medium [&p]text-base",
11
+ subtitle: "",
12
+ title: "text-2xl",
13
+ display: "text-5xl [&strong]:font-semibold [&>strong]:font-semibold"
14
+ },
15
+ isStrong: { false: "", true: "" },
16
+ size: { small: "", medium: "", large: "" }
17
+ },
18
+ compoundVariants: [
19
+ // caption
20
+ { variant: "caption", isStrong: !0, class: "font-bold" },
21
+ // body
22
+ { variant: "body", isStrong: !0, class: "font-medium" },
23
+ // subtitle
24
+ { variant: "subtitle", isStrong: !0, class: "font-bold" },
25
+ // title
26
+ { variant: "title", size: "small", class: "text-lg" },
27
+ // { variant: 'title', size: 'medium', class: 'text-2xl' },
28
+ { variant: "title", size: "large", class: "text-3xl" },
29
+ { variant: "title", isStrong: !0, class: "font-bold" },
30
+ // display
31
+ { variant: "display", size: "small", class: "text-4xl" },
32
+ // { variant: 'display', size: 'medium', class: 'text-5xl' }
33
+ { variant: "display", isStrong: !0, class: "font-bold" }
34
+ ]
35
+ }
36
+ ), x = (s, t) => f(u(s), t), y = /* @__PURE__ */ a({
37
+ __name: "AmText",
38
+ props: {
39
+ as: { default: "div" },
40
+ size: { default: "medium" },
41
+ variant: { default: "body" },
42
+ isStrong: { type: Boolean, default: !1 },
43
+ class: {},
44
+ style: {}
45
+ },
46
+ setup(s) {
47
+ const t = s;
48
+ return (e, p) => (o(), l(n(e.as), {
49
+ class: r(i(x)(t, t.class))
50
+ }, {
51
+ default: m(() => [
52
+ d(e.$slots, "default")
53
+ ]),
54
+ _: 3
55
+ }, 8, ["class"]));
56
+ }
57
+ });
58
+ export {
59
+ y as _
60
+ };
@@ -1,6 +1,6 @@
1
- import { AllowedComponentProps, AnchorHTMLAttributes, ButtonHTMLAttributes, Component, DefineComponent, VNode } from 'vue';
1
+ import { AllowedComponentProps, Component, DefineComponent, VNode } from 'vue';
2
2
 
3
- export interface AmButtonProps extends AllowedComponentProps, /* @vue-ignore */ AnchorHTMLAttributes, /* @vue-ignore */ ButtonHTMLAttributes {
3
+ export interface AmButtonProps extends AllowedComponentProps {
4
4
  as?: string | Component;
5
5
  to?: string | Record<string, any>;
6
6
  label?: string;
@@ -21,6 +21,8 @@ export interface AmButtonProps extends AllowedComponentProps, /* @vue-ignore */
21
21
  size?: 'small' | 'large';
22
22
  plain?: boolean;
23
23
  fluid?: boolean;
24
+ href?: string;
25
+ disabled?: boolean;
24
26
  }
25
27
 
26
28
  export interface AmButtonSlots {
package/ambutton/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as i, computed as o, openBlock as l, createBlock as d, unref as u, mergeProps as f, withCtx as p, renderSlot as c } from "vue";
2
- import m from "primevue/button";
3
- import { _ as B } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
- const b = /* @__PURE__ */ i({
2
+ import B from "primevue/button";
3
+ import { _ as b } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const m = /* @__PURE__ */ i({
5
5
  __name: "AmButton",
6
6
  props: {
7
7
  as: {},
@@ -24,6 +24,8 @@ const b = /* @__PURE__ */ i({
24
24
  size: {},
25
25
  plain: { type: Boolean },
26
26
  fluid: { type: Boolean },
27
+ href: {},
28
+ disabled: { type: Boolean },
27
29
  class: {},
28
30
  style: {}
29
31
  },
@@ -35,7 +37,7 @@ const b = /* @__PURE__ */ i({
35
37
  if (!(e.disabled || t) && e.to)
36
38
  return e.to;
37
39
  }), s = o(() => e.as ? e.as : e.disabled ? "button" : e.href ? "a" : e.to ? "router-link" : "button");
38
- return (r, v) => (l(), d(u(m), f(e, {
40
+ return (r, v) => (l(), d(u(B), f(e, {
39
41
  as: s.value,
40
42
  disabled: r.disabled,
41
43
  to: a.value,
@@ -47,7 +49,7 @@ const b = /* @__PURE__ */ i({
47
49
  _: 3
48
50
  }, 16, ["as", "disabled", "to", "href"]));
49
51
  }
50
- }), g = /* @__PURE__ */ B(b, [["__scopeId", "data-v-9decee48"]]);
52
+ }), g = /* @__PURE__ */ b(m, [["__scopeId", "data-v-4a9fa468"]]);
51
53
  export {
52
54
  g as default
53
55
  };
@@ -0,0 +1,14 @@
1
+ import { AllowedComponentProps, AnchorHTMLAttributes, DefineComponent, VNode } from 'vue';
2
+
3
+ export interface AmDateFilterProps extends AllowedComponentProps {
4
+ defaultSelected?: 0 | 1 | 7 | 14 | 30;
5
+ modelValue: string;
6
+ minDate?: Date;
7
+ maxDate?: Date;
8
+ }
9
+
10
+ export interface AmDateFilterEmits {}
11
+
12
+ declare const AmDateFilter: DefineComponent<AmDateFilterProps, AmDateFilterEmits>;
13
+
14
+ export default AmDateFilter;
@@ -0,0 +1,150 @@
1
+ import { defineComponent as F, ref as n, computed as B, watch as d, openBlock as _, createElementBlock as h, createVNode as u, unref as i, withCtx as C } from "vue";
2
+ import V from "primevue/menu";
3
+ import H from "primevue/popover";
4
+ import O from "primevue/datepicker";
5
+ import { _ as j } from "../_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const P = /* @__PURE__ */ F({
7
+ __name: "AmDateFilter",
8
+ props: {
9
+ defaultSelected: {},
10
+ modelValue: {},
11
+ minDate: {},
12
+ maxDate: {},
13
+ class: {},
14
+ style: {}
15
+ },
16
+ emits: ["update:modelValue"],
17
+ setup(p, { emit: D }) {
18
+ const v = p, b = D, o = n(), c = n(), l = n(null), f = {
19
+ root: {
20
+ class: "!min-w-0 am-date-filter"
21
+ },
22
+ list: {
23
+ class: "!flex-row !p-0"
24
+ },
25
+ item: {
26
+ class: "w-full"
27
+ },
28
+ itemLink: {
29
+ class: "!px-[7px] !py-[5px] hover:bg-[#EBE1FE] !text-[#858585] !text-sm !min-h-[34px] justify-center"
30
+ },
31
+ itemIcon: {
32
+ class: "!text-[#858585] !text-sm"
33
+ }
34
+ }, E = {
35
+ content: {
36
+ class: "!p-0"
37
+ }
38
+ }, g = {
39
+ dayCell: {
40
+ class: "!p-0"
41
+ },
42
+ tableHeaderCell: {
43
+ class: "!p-0"
44
+ },
45
+ panel: {
46
+ class: "!p-0 !border-none"
47
+ }
48
+ }, k = B(() => [
49
+ {
50
+ label: "Customizar",
51
+ icon: "pi pi-calendar",
52
+ command: (e) => {
53
+ c.value.toggle(e.originalEvent), a("Customizar");
54
+ },
55
+ class: ["custom", o.value === "Customizar" ? "bg-[#EBE1FE]" : ""]
56
+ },
57
+ { label: "Hoje", command: () => a("Hoje"), class: o.value === "Hoje" ? "bg-[#EBE1FE]" : "" },
58
+ { label: "Ontem", command: () => a("Ontem"), class: o.value === "Ontem" ? "bg-[#EBE1FE]" : "" },
59
+ { label: "7D", command: () => a("7D"), class: o.value === "7D" ? "bg-[#EBE1FE]" : "" },
60
+ { label: "14D", command: () => a("14D"), class: o.value === "14D" ? "bg-[#EBE1FE]" : "" },
61
+ { label: "30D", command: () => a("30D"), class: o.value === "30D" ? "bg-[#EBE1FE]" : "" }
62
+ ]), a = (e) => {
63
+ switch (o.value = e, e) {
64
+ case "Hoje":
65
+ l.value = [s(), s()];
66
+ break;
67
+ case "Ontem":
68
+ l.value = [m(-1), m(-1)];
69
+ break;
70
+ case "7D":
71
+ l.value = [m(-7), s()];
72
+ break;
73
+ case "14D":
74
+ l.value = [m(-14), s()];
75
+ break;
76
+ case "30D":
77
+ l.value = [m(-30), s()];
78
+ break;
79
+ }
80
+ }, s = () => {
81
+ const e = /* @__PURE__ */ new Date();
82
+ return e.setHours(0, 0, 0, 0), e;
83
+ }, m = (e) => {
84
+ const t = s();
85
+ return t.setDate(t.getDate() + e), t;
86
+ }, x = (e) => {
87
+ switch (e) {
88
+ case 0:
89
+ a("Hoje");
90
+ break;
91
+ case 1:
92
+ a("Ontem");
93
+ break;
94
+ case 7:
95
+ a("7D");
96
+ break;
97
+ case 14:
98
+ a("14D");
99
+ break;
100
+ case 30:
101
+ a("30D");
102
+ break;
103
+ default:
104
+ a("Customizar");
105
+ break;
106
+ }
107
+ };
108
+ return d(l, (e) => {
109
+ var t;
110
+ if (Array.isArray(e) && e.length === 2 && e[0] && e[1]) {
111
+ (t = c.value) == null || t.hide();
112
+ const r = e.map((y) => y.toISOString());
113
+ b("update:modelValue", r);
114
+ }
115
+ }), d(
116
+ () => v.defaultSelected,
117
+ (e) => {
118
+ x(e);
119
+ },
120
+ { immediate: !0 }
121
+ ), (e, t) => (_(), h("div", null, [
122
+ u(i(V), {
123
+ model: k.value,
124
+ pt: f
125
+ }, null, 8, ["model"]),
126
+ u(i(H), {
127
+ ref_key: "popover",
128
+ ref: c,
129
+ pt: E
130
+ }, {
131
+ default: C(() => [
132
+ u(i(O), {
133
+ modelValue: l.value,
134
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => l.value = r),
135
+ selectionMode: "range",
136
+ inline: "",
137
+ pt: g,
138
+ dateFormat: "yyyy-mm-dd",
139
+ minDate: e.minDate,
140
+ maxDate: e.maxDate
141
+ }, null, 8, ["modelValue", "minDate", "maxDate"])
142
+ ]),
143
+ _: 1
144
+ }, 512)
145
+ ]));
146
+ }
147
+ }), M = /* @__PURE__ */ j(P, [["__scopeId", "data-v-1990f91c"]]);
148
+ export {
149
+ M as default
150
+ };
@@ -0,0 +1,24 @@
1
+ import { AllowedComponentProps, Component, DefineComponent, VNode } from 'vue';
2
+ import { AmFieldWrapperProps } from '../AmFieldWrapper';
3
+
4
+ export interface AmFieldProps extends AllowedComponentProps, Omit<AmFieldWrapperProps, "error"> {
5
+ as?: Component;
6
+ name: string;
7
+ }
8
+
9
+ export interface AmFieldSlots {}
10
+
11
+ export interface AmFieldEmits {}
12
+
13
+ /**
14
+ * **DS Prime - AmField**
15
+ *
16
+ * AmField é um componente que adiciona elementos ao redor do um campo de formulário o DS Prime.
17
+ * Esse elementos são label, mensagem de erro e mensagem de ajuda.
18
+ *
19
+ * [Documentação](https://appmax-space.bitbucket.io/ds-prime/componentes/AmField.html)
20
+ */
21
+
22
+ declare const AmField: DefineComponent<AmFieldProps, AmFieldSlots, AmFieldEmits>;
23
+
24
+ export default AmField;
@@ -0,0 +1,41 @@
1
+ import { defineComponent as m, createPropsRestProxy as c, useAttrs as u, openBlock as t, createBlock as l, unref as f, withCtx as s, createVNode as i, resolveDynamicComponent as _, normalizeProps as d, guardReactiveProps as h } from "vue";
2
+ import { _ as b } from "../AmFieldWrapper.vue_vue_type_script_setup_true_lang-BMFtIZal.js";
3
+ import P from "primevue/inputtext";
4
+ import { FormField as y } from "@primevue/forms";
5
+ const C = { name: "AmField" }, A = /* @__PURE__ */ m({
6
+ ...C,
7
+ props: {
8
+ as: { default: () => P },
9
+ name: {},
10
+ class: {},
11
+ style: {},
12
+ label: {},
13
+ help: {}
14
+ },
15
+ setup(n) {
16
+ const o = c(n, ["as", "help", "label"]), p = { ...o, ...u() };
17
+ return (e, F) => (t(), l(f(y), {
18
+ name: o.name
19
+ }, {
20
+ default: s((r) => {
21
+ var a;
22
+ return [
23
+ i(b, {
24
+ help: e.help,
25
+ label: e.label,
26
+ error: (a = r == null ? void 0 : r.error) == null ? void 0 : a.message
27
+ }, {
28
+ default: s(() => [
29
+ (t(), l(_(e.as), d(h(p)), null, 16))
30
+ ]),
31
+ _: 2
32
+ }, 1032, ["help", "label", "error"])
33
+ ];
34
+ }),
35
+ _: 1
36
+ }, 8, ["name"]));
37
+ }
38
+ });
39
+ export {
40
+ A as default
41
+ };
@@ -0,0 +1,26 @@
1
+ import { AllowedComponentProps, Component, DefineComponent, VNode } from 'vue';
2
+
3
+ export interface AmFieldWrapperProps {
4
+ label?: string;
5
+ error?: string | null;
6
+ help?: string;
7
+ }
8
+
9
+ export interface AmFieldWrapperSlots {
10
+ default: () => VNode[],
11
+ };
12
+
13
+ export interface AmFieldWrapperEmits {};
14
+
15
+ /**
16
+ * **DS Prime - AmFieldWrapper**
17
+ *
18
+ * AmFieldWrapper é um componente que adiciona elementos ao redor do um campo de formulário o DS Prime.
19
+ * Esse elementos são label, mensagem de erro e mensagem de ajuda.
20
+ *
21
+ * [Documentação](https://appmax-space.bitbucket.io/ds-prime/componentes/AmFieldWrapper.html)
22
+ */
23
+
24
+ declare const AmText: DefineComponent<AmFieldWrapperProps, AmFieldWrapperSlots, AmFieldWrapperEmits>;
25
+
26
+ export default AmText;
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "../AmFieldWrapper.vue_vue_type_script_setup_true_lang-BMFtIZal.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,25 @@
1
+ import { AllowedComponentProps, Component, DefineComponent, VNode } from 'vue';
2
+ import type { ZodObject } from 'zod';
3
+
4
+ export interface AmFormProps {
5
+ schema: ZodObject;
6
+ }
7
+
8
+ export interface AmFormSlots {
9
+ default: () => VNode[];
10
+ }
11
+
12
+ export interface AmFormEmits {}
13
+
14
+ /**
15
+ * **DS Prime - AmForm**
16
+ *
17
+ * AmForm é um componente que adiciona elementos ao redor do um campo de formulário o DS Prime.
18
+ * Esse elementos são label, mensagem de erro e mensagem de ajuda.
19
+ *
20
+ * [Documentação](https://appmax-space.bitbucket.io/ds-prime/componentes/AmForm.html)
21
+ */
22
+
23
+ declare const AmForm: DefineComponent<AmFormProps, AmFormSlots, AmFormEmits>;
24
+
25
+ export default AmForm;
@@ -0,0 +1,21 @@
1
+ import { defineComponent as m, openBlock as a, createBlock as n, unref as e, withCtx as l, renderSlot as c, normalizeProps as p, guardReactiveProps as f } from "vue";
2
+ import { Form as u } from "@primevue/forms";
3
+ import { zodResolver as d } from "@primevue/forms/resolvers/zod";
4
+ const i = { name: "AmForm" }, x = /* @__PURE__ */ m({
5
+ ...i,
6
+ props: {
7
+ schema: {}
8
+ },
9
+ setup(r) {
10
+ const o = d(r.schema);
11
+ return (t, _) => (a(), n(e(u), { resolver: e(o) }, {
12
+ default: l((s) => [
13
+ c(t.$slots, "default", p(f(s)))
14
+ ]),
15
+ _: 3
16
+ }, 8, ["resolver"]));
17
+ }
18
+ });
19
+ export {
20
+ x as default
21
+ };
package/amtext/index.js CHANGED
@@ -1,60 +1,4 @@
1
- import { defineComponent as a, openBlock as o, createBlock as l, resolveDynamicComponent as n, normalizeClass as r, unref as i, withCtx as m, renderSlot as d } from "vue";
2
- import { cva as c } from "class-variance-authority";
3
- import { twMerge as f } from "tailwind-merge";
4
- const u = c(
5
- "am-text font-normal text-color text-base [&strong]:font-bold [&>strong]:font-bold",
6
- {
7
- variants: {
8
- variant: {
9
- caption: "text-xs text-muted-color font-medium",
10
- body: "text-sm [&strong]:font-medium [&>strong]:font-medium [&p]text-base",
11
- subtitle: "",
12
- title: "text-2xl",
13
- display: "text-5xl [&strong]:font-semibold [&>strong]:font-semibold"
14
- },
15
- isStrong: { false: "", true: "" },
16
- size: { small: "", medium: "", large: "" }
17
- },
18
- compoundVariants: [
19
- // caption
20
- { variant: "caption", isStrong: !0, class: "font-bold" },
21
- // body
22
- { variant: "body", isStrong: !0, class: "font-medium" },
23
- // subtitle
24
- { variant: "subtitle", isStrong: !0, class: "font-bold" },
25
- // title
26
- { variant: "title", size: "small", class: "text-lg" },
27
- // { variant: 'title', size: 'medium', class: 'text-2xl' },
28
- { variant: "title", size: "large", class: "text-3xl" },
29
- { variant: "title", isStrong: !0, class: "font-bold" },
30
- // display
31
- { variant: "display", size: "small", class: "text-4xl" },
32
- // { variant: 'display', size: 'medium', class: 'text-5xl' }
33
- { variant: "display", isStrong: !0, class: "font-bold" }
34
- ]
35
- }
36
- ), x = (e, t) => f(u(e), t), y = /* @__PURE__ */ a({
37
- __name: "AmText",
38
- props: {
39
- as: { default: "div" },
40
- size: { default: "medium" },
41
- variant: { default: "body" },
42
- isStrong: { type: Boolean, default: !1 },
43
- class: {},
44
- style: {}
45
- },
46
- setup(e) {
47
- const t = e;
48
- return (s, p) => (o(), l(n(s.as), {
49
- class: r(i(x)(t, t.class))
50
- }, {
51
- default: m(() => [
52
- d(s.$slots, "default")
53
- ]),
54
- _: 3
55
- }, 8, ["class"]));
56
- }
57
- });
1
+ import { _ as f } from "../AmText.vue_vue_type_script_setup_true_lang-BMNozCVT.js";
58
2
  export {
59
- y as default
3
+ f as default
60
4
  };
@@ -0,0 +1,2 @@
1
+ export * from 'primevue/checkboxgroup';
2
+ export { default } from 'primevue/checkboxgroup';
@@ -0,0 +1,2 @@
1
+ export * from 'primevue/checkboxgroup';
2
+ export { default } from 'primevue/checkboxgroup';