tax4all-components 0.1.0

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 ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ export * from './src/index'
2
+ export {}
@@ -0,0 +1,297 @@
1
+ import { defineComponent as h, computed as v, openBlock as d, createElementBlock as u, normalizeClass as c, createElementVNode as n, createCommentVNode as m, toDisplayString as k, ref as B, onMounted as w, createTextVNode as I, createVNode as p } from "vue";
2
+ const S = ["disabled"], M = {
3
+ key: 0,
4
+ class: "spinner"
5
+ }, z = {
6
+ key: 2,
7
+ class: "btn-label"
8
+ }, N = {
9
+ key: 4,
10
+ class: "btn-badge"
11
+ }, T = ["disabled"], W = /* @__PURE__ */ h({
12
+ __name: "BaseButton",
13
+ props: {
14
+ label: {},
15
+ icon: {},
16
+ iconPosition: { default: "left" },
17
+ badge: {},
18
+ variant: { default: "solid" },
19
+ size: { default: "cozy" },
20
+ state: { default: "neutral" },
21
+ disabled: { type: Boolean, default: !1 },
22
+ loading: { type: Boolean, default: !1 },
23
+ fullWidth: { type: Boolean, default: !1 },
24
+ split: { type: Boolean, default: !1 },
25
+ dropdown: { type: Boolean, default: !1 }
26
+ },
27
+ emits: ["click", "split-click"],
28
+ setup(e, { emit: r }) {
29
+ const a = e, i = r;
30
+ function l() {
31
+ !a.disabled && !a.loading && i("click");
32
+ }
33
+ const s = v(() => a.label ? a.iconPosition : "left"), o = v(() => [
34
+ `variant-${a.variant}`,
35
+ `size-${a.size}`,
36
+ `state-${a.state}`,
37
+ {
38
+ "icon-only": a.icon && !a.label,
39
+ disabled: a.disabled
40
+ }
41
+ ]);
42
+ return (b, t) => (d(), u("div", {
43
+ class: c(["base-button-wrapper", { "full-width": a.fullWidth, split: a.split }])
44
+ }, [
45
+ n("button", {
46
+ class: c(["base-button", o.value]),
47
+ disabled: e.disabled || e.loading,
48
+ onClick: l
49
+ }, [
50
+ e.loading ? (d(), u("span", M)) : m("", !0),
51
+ e.icon && s.value === "left" && !e.loading ? (d(), u("i", {
52
+ key: 1,
53
+ class: c([e.icon, "btn-icon"])
54
+ }, null, 2)) : m("", !0),
55
+ e.label ? (d(), u("span", z, k(e.label), 1)) : m("", !0),
56
+ e.icon && s.value === "right" && !e.loading ? (d(), u("i", {
57
+ key: 3,
58
+ class: c([e.icon, "btn-icon"])
59
+ }, null, 2)) : m("", !0),
60
+ e.badge !== void 0 ? (d(), u("span", N, k(e.badge), 1)) : m("", !0)
61
+ ], 10, S),
62
+ e.split ? (d(), u("button", {
63
+ key: 0,
64
+ class: c(["base-button split-button", o.value]),
65
+ disabled: e.disabled,
66
+ onClick: t[0] || (t[0] = (f) => b.$emit("split-click"))
67
+ }, [...t[1] || (t[1] = [
68
+ n("i", { class: "bi bi-chevron-down" }, null, -1)
69
+ ])], 10, T)) : m("", !0)
70
+ ], 2));
71
+ }
72
+ }), C = (e, r) => {
73
+ const a = e.__vccOpts || e;
74
+ for (const [i, l] of r)
75
+ a[i] = l;
76
+ return a;
77
+ }, E = /* @__PURE__ */ C(W, [["__scopeId", "data-v-0ce8be12"]]), P = {
78
+ key: 0,
79
+ class: "base-input__label"
80
+ }, F = ["value", "placeholder", "readonly", "disabled"], A = /* @__PURE__ */ h({
81
+ __name: "BaseInput",
82
+ props: {
83
+ modelValue: {},
84
+ label: {},
85
+ placeholder: {},
86
+ variant: { default: "outlined" },
87
+ state: { default: "default" },
88
+ size: { default: "md" },
89
+ fullWidth: { type: Boolean, default: !1 },
90
+ readonly: { type: Boolean, default: !1 },
91
+ disabled: { type: Boolean, default: !1 }
92
+ },
93
+ emits: ["update:modelValue"],
94
+ setup(e, { emit: r }) {
95
+ const a = e, i = r, l = B(a.state);
96
+ function s(V) {
97
+ const _ = V.target;
98
+ i("update:modelValue", _.value);
99
+ }
100
+ function o() {
101
+ a.disabled || (l.value = "focus");
102
+ }
103
+ function b() {
104
+ a.disabled || (l.value = "default");
105
+ }
106
+ function t() {
107
+ a.disabled || l.value !== "focus" && (l.value = "hover");
108
+ }
109
+ function f() {
110
+ a.disabled || l.value !== "focus" && (l.value = "default");
111
+ }
112
+ const g = v(() => [
113
+ "base-input",
114
+ `base-input--${a.variant}`,
115
+ `base-input--${a.size}`,
116
+ `base-input--${l.value}`,
117
+ {
118
+ "base-input--full": a.fullWidth,
119
+ "base-input--disabled": a.disabled
120
+ }
121
+ ]), y = v(() => [
122
+ "base-input__field"
123
+ ]);
124
+ return (V, _) => (d(), u("div", {
125
+ class: c(g.value)
126
+ }, [
127
+ e.label ? (d(), u("label", P, k(e.label), 1)) : m("", !0),
128
+ n("input", {
129
+ value: e.modelValue,
130
+ placeholder: e.placeholder,
131
+ readonly: e.readonly,
132
+ disabled: e.disabled,
133
+ class: c(y.value),
134
+ onInput: s,
135
+ onFocus: o,
136
+ onBlur: b,
137
+ onMouseenter: t,
138
+ onMouseleave: f
139
+ }, null, 42, F)
140
+ ], 2));
141
+ }
142
+ }), x = /* @__PURE__ */ C(A, [["__scopeId", "data-v-f4861b50"]]), L = { class: "base-snackbar__icon" }, O = { class: "base-snackbar__content" }, U = { class: "base-snackbar__title" }, D = { class: "base-snackbar__message" }, J = /* @__PURE__ */ h({
143
+ __name: "BaseSnackbar",
144
+ props: {
145
+ title: {},
146
+ message: {},
147
+ variant: { default: "success" },
148
+ duration: { default: 4e3 }
149
+ },
150
+ emits: ["close"],
151
+ setup(e, { emit: r }) {
152
+ const a = e, i = r, l = B(!1);
153
+ let s = null;
154
+ const o = v(() => ({
155
+ success: "bi bi-check-circle-fill",
156
+ warning: "bi bi-exclamation-triangle-fill",
157
+ critical: "bi bi-x-circle-fill"
158
+ })[a.variant]);
159
+ function b() {
160
+ s = setTimeout(() => {
161
+ l.value = !0;
162
+ }, a.duration);
163
+ }
164
+ function t(g) {
165
+ g.propertyName === "opacity" && l.value && i("close");
166
+ }
167
+ function f() {
168
+ s && clearTimeout(s), l.value = !0;
169
+ }
170
+ return w(() => {
171
+ b();
172
+ }), (g, y) => (d(), u("div", {
173
+ class: c(["base-snackbar", [`base-snackbar--${e.variant}`, { "base-snackbar--hide": l.value }]]),
174
+ onTransitionend: t
175
+ }, [
176
+ n("div", L, [
177
+ n("i", {
178
+ class: c(o.value)
179
+ }, null, 2)
180
+ ]),
181
+ n("div", O, [
182
+ n("strong", U, k(e.title), 1),
183
+ n("span", D, k(e.message), 1)
184
+ ]),
185
+ n("button", {
186
+ class: "base-snackbar__close",
187
+ onClick: f
188
+ }, [...y[0] || (y[0] = [
189
+ n("i", { class: "bi bi-x-lg" }, null, -1),
190
+ I(" Fechar ", -1)
191
+ ])])
192
+ ], 34));
193
+ }
194
+ }), G = /* @__PURE__ */ h({
195
+ __name: "BaseAuthProviderChip",
196
+ props: {
197
+ provider: {},
198
+ dark: { type: Boolean, default: !1 }
199
+ },
200
+ emits: ["click"],
201
+ setup(e, { emit: r }) {
202
+ const a = e, i = r, l = v(() => ({
203
+ google: "Google",
204
+ microsoft: "Microsoft",
205
+ apple: "Apple"
206
+ })[a.provider]), s = v(() => ({
207
+ google: "bi bi-google",
208
+ microsoft: "bi bi-microsoft",
209
+ apple: "bi bi-apple"
210
+ })[a.provider]);
211
+ function o() {
212
+ i("click", a.provider);
213
+ }
214
+ return (b, t) => (d(), u("button", {
215
+ class: c(["auth-chip", [`auth-chip--${e.provider}`, { "auth-chip--dark": e.dark }]]),
216
+ onClick: o
217
+ }, [
218
+ n("i", {
219
+ class: c(s.value)
220
+ }, null, 2),
221
+ n("span", null, k(l.value), 1)
222
+ ], 2));
223
+ }
224
+ }), $ = /* @__PURE__ */ C(G, [["__scopeId", "data-v-b6215df6"]]), H = { class: "login-form__providers" }, j = /* @__PURE__ */ h({
225
+ __name: "BaseLoginForm",
226
+ props: {
227
+ dark: { type: Boolean, default: !1 },
228
+ loading: { type: Boolean, default: !1 }
229
+ },
230
+ emits: ["submit", "provider"],
231
+ setup(e, { emit: r }) {
232
+ const a = r, i = B(""), l = B("");
233
+ function s() {
234
+ a("submit", {
235
+ login: i.value,
236
+ password: l.value
237
+ });
238
+ }
239
+ function o(b) {
240
+ a("provider", b);
241
+ }
242
+ return (b, t) => (d(), u("div", {
243
+ class: c(["login-form", { "login-form--dark": e.dark }])
244
+ }, [
245
+ t[2] || (t[2] = n("h2", { class: "login-form__title" }, "Acessar Sistema", -1)),
246
+ t[3] || (t[3] = n("p", { class: "login-form__subtitle" }, "Digite seu login e senha para continuar", -1)),
247
+ p(x, {
248
+ modelValue: i.value,
249
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => i.value = f),
250
+ label: "Login",
251
+ placeholder: "Seu login",
252
+ fullWidth: ""
253
+ }, null, 8, ["modelValue"]),
254
+ p(x, {
255
+ modelValue: l.value,
256
+ "onUpdate:modelValue": t[1] || (t[1] = (f) => l.value = f),
257
+ label: "Senha",
258
+ placeholder: "Sua senha",
259
+ type: "password",
260
+ fullWidth: ""
261
+ }, null, 8, ["modelValue"]),
262
+ p(E, {
263
+ label: "Entrar",
264
+ variant: "solid",
265
+ loading: e.loading,
266
+ fullWidth: "",
267
+ onClick: s
268
+ }, null, 8, ["loading"]),
269
+ t[4] || (t[4] = n("div", { class: "login-form__divider" }, [
270
+ n("span", null, "OU CONTINUE COM")
271
+ ], -1)),
272
+ n("div", H, [
273
+ p($, {
274
+ provider: "google",
275
+ dark: e.dark,
276
+ onClick: o
277
+ }, null, 8, ["dark"]),
278
+ p($, {
279
+ provider: "microsoft",
280
+ dark: e.dark,
281
+ onClick: o
282
+ }, null, 8, ["dark"]),
283
+ p($, {
284
+ provider: "apple",
285
+ dark: e.dark,
286
+ onClick: o
287
+ }, null, 8, ["dark"])
288
+ ])
289
+ ], 2));
290
+ }
291
+ }), K = /* @__PURE__ */ C(j, [["__scopeId", "data-v-b1287f25"]]);
292
+ export {
293
+ E as BaseButton,
294
+ x as BaseInput,
295
+ K as BaseLoginForm,
296
+ J as BaseSnackbar
297
+ };
@@ -0,0 +1 @@
1
+ (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r["frontend-componentes-atender"]={},r.Vue))})(this,function(r,e){"use strict";const C=["disabled"],V={key:0,class:"spinner"},y={key:2,class:"btn-label"},N={key:4,class:"btn-badge"},E=["disabled"],$=e.defineComponent({__name:"BaseButton",props:{label:{},icon:{},iconPosition:{default:"left"},badge:{},variant:{default:"solid"},size:{default:"cozy"},state:{default:"neutral"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},split:{type:Boolean,default:!1},dropdown:{type:Boolean,default:!1}},emits:["click","split-click"],setup(t,{emit:d}){const l=t,o=d;function a(){!l.disabled&&!l.loading&&o("click")}const i=e.computed(()=>l.label?l.iconPosition:"left"),s=e.computed(()=>[`variant-${l.variant}`,`size-${l.size}`,`state-${l.state}`,{"icon-only":l.icon&&!l.label,disabled:l.disabled}]);return(c,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["base-button-wrapper",{"full-width":l.fullWidth,split:l.split}])},[e.createElementVNode("button",{class:e.normalizeClass(["base-button",s.value]),disabled:t.disabled||t.loading,onClick:a},[t.loading?(e.openBlock(),e.createElementBlock("span",V)):e.createCommentVNode("",!0),t.icon&&i.value==="left"&&!t.loading?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass([t.icon,"btn-icon"])},null,2)):e.createCommentVNode("",!0),t.label?(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),t.icon&&i.value==="right"&&!t.loading?(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass([t.icon,"btn-icon"])},null,2)):e.createCommentVNode("",!0),t.badge!==void 0?(e.openBlock(),e.createElementBlock("span",N,e.toDisplayString(t.badge),1)):e.createCommentVNode("",!0)],10,C),t.split?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["base-button split-button",s.value]),disabled:t.disabled,onClick:n[0]||(n[0]=m=>c.$emit("split-click"))},[...n[1]||(n[1]=[e.createElementVNode("i",{class:"bi bi-chevron-down"},null,-1)])],10,E)):e.createCommentVNode("",!0)],2))}}),f=(t,d)=>{const l=t.__vccOpts||t;for(const[o,a]of d)l[o]=a;return l},g=f($,[["__scopeId","data-v-0ce8be12"]]),z={key:0,class:"base-input__label"},_=["value","placeholder","readonly","disabled"],p=f(e.defineComponent({__name:"BaseInput",props:{modelValue:{},label:{},placeholder:{},variant:{default:"outlined"},state:{default:"default"},size:{default:"md"},fullWidth:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,a=e.ref(l.state);function i(B){const h=B.target;o("update:modelValue",h.value)}function s(){l.disabled||(a.value="focus")}function c(){l.disabled||(a.value="default")}function n(){l.disabled||a.value!=="focus"&&(a.value="hover")}function m(){l.disabled||a.value!=="focus"&&(a.value="default")}const u=e.computed(()=>["base-input",`base-input--${l.variant}`,`base-input--${l.size}`,`base-input--${a.value}`,{"base-input--full":l.fullWidth,"base-input--disabled":l.disabled}]),b=e.computed(()=>["base-input__field"]);return(B,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value)},[t.label?(e.openBlock(),e.createElementBlock("label",z,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.createElementVNode("input",{value:t.modelValue,placeholder:t.placeholder,readonly:t.readonly,disabled:t.disabled,class:e.normalizeClass(b.value),onInput:i,onFocus:s,onBlur:c,onMouseenter:n,onMouseleave:m},null,42,_)],2))}}),[["__scopeId","data-v-f4861b50"]]),S={class:"base-snackbar__icon"},I={class:"base-snackbar__content"},T={class:"base-snackbar__title"},w={class:"base-snackbar__message"},M=e.defineComponent({__name:"BaseSnackbar",props:{title:{},message:{},variant:{default:"success"},duration:{default:4e3}},emits:["close"],setup(t,{emit:d}){const l=t,o=d,a=e.ref(!1);let i=null;const s=e.computed(()=>({success:"bi bi-check-circle-fill",warning:"bi bi-exclamation-triangle-fill",critical:"bi bi-x-circle-fill"})[l.variant]);function c(){i=setTimeout(()=>{a.value=!0},l.duration)}function n(u){u.propertyName==="opacity"&&a.value&&o("close")}function m(){i&&clearTimeout(i),a.value=!0}return e.onMounted(()=>{c()}),(u,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["base-snackbar",[`base-snackbar--${t.variant}`,{"base-snackbar--hide":a.value}]]),onTransitionend:n},[e.createElementVNode("div",S,[e.createElementVNode("i",{class:e.normalizeClass(s.value)},null,2)]),e.createElementVNode("div",I,[e.createElementVNode("strong",T,e.toDisplayString(t.title),1),e.createElementVNode("span",w,e.toDisplayString(t.message),1)]),e.createElementVNode("button",{class:"base-snackbar__close",onClick:m},[...b[0]||(b[0]=[e.createElementVNode("i",{class:"bi bi-x-lg"},null,-1),e.createTextVNode(" Fechar ",-1)])])],34))}}),k=f(e.defineComponent({__name:"BaseAuthProviderChip",props:{provider:{},dark:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:d}){const l=t,o=d,a=e.computed(()=>({google:"Google",microsoft:"Microsoft",apple:"Apple"})[l.provider]),i=e.computed(()=>({google:"bi bi-google",microsoft:"bi bi-microsoft",apple:"bi bi-apple"})[l.provider]);function s(){o("click",l.provider)}return(c,n)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["auth-chip",[`auth-chip--${t.provider}`,{"auth-chip--dark":t.dark}]]),onClick:s},[e.createElementVNode("i",{class:e.normalizeClass(i.value)},null,2),e.createElementVNode("span",null,e.toDisplayString(a.value),1)],2))}}),[["__scopeId","data-v-b6215df6"]]),x={class:"login-form__providers"},D=f(e.defineComponent({__name:"BaseLoginForm",props:{dark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["submit","provider"],setup(t,{emit:d}){const l=d,o=e.ref(""),a=e.ref("");function i(){l("submit",{login:o.value,password:a.value})}function s(c){l("provider",c)}return(c,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["login-form",{"login-form--dark":t.dark}])},[n[2]||(n[2]=e.createElementVNode("h2",{class:"login-form__title"},"Acessar Sistema",-1)),n[3]||(n[3]=e.createElementVNode("p",{class:"login-form__subtitle"},"Digite seu login e senha para continuar",-1)),e.createVNode(p,{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=m=>o.value=m),label:"Login",placeholder:"Seu login",fullWidth:""},null,8,["modelValue"]),e.createVNode(p,{modelValue:a.value,"onUpdate:modelValue":n[1]||(n[1]=m=>a.value=m),label:"Senha",placeholder:"Sua senha",type:"password",fullWidth:""},null,8,["modelValue"]),e.createVNode(g,{label:"Entrar",variant:"solid",loading:t.loading,fullWidth:"",onClick:i},null,8,["loading"]),n[4]||(n[4]=e.createElementVNode("div",{class:"login-form__divider"},[e.createElementVNode("span",null,"OU CONTINUE COM")],-1)),e.createElementVNode("div",x,[e.createVNode(k,{provider:"google",dark:t.dark,onClick:s},null,8,["dark"]),e.createVNode(k,{provider:"microsoft",dark:t.dark,onClick:s},null,8,["dark"]),e.createVNode(k,{provider:"apple",dark:t.dark,onClick:s},null,8,["dark"])])],2))}}),[["__scopeId","data-v-b1287f25"]]);r.BaseButton=g,r.BaseInput=p,r.BaseLoginForm=D,r.BaseSnackbar=M,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,9 @@
1
+ import { IBaseAuthProviderChipProps, AuthProvider } from '../interfaces/IBaseAuthProviderChip';
2
+ declare const _default: import('vue').DefineComponent<IBaseAuthProviderChipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ click: (provider: AuthProvider) => any;
4
+ }, string, import('vue').PublicProps, Readonly<IBaseAuthProviderChipProps> & Readonly<{
5
+ onClick?: ((provider: AuthProvider) => any) | undefined;
6
+ }>, {
7
+ dark: boolean;
8
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
9
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { IBaseButtonProps } from '../interfaces/IBaseButton';
2
+ declare const _default: import('vue').DefineComponent<IBaseButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ click: () => any;
4
+ "split-click": () => any;
5
+ }, string, import('vue').PublicProps, Readonly<IBaseButtonProps> & Readonly<{
6
+ onClick?: (() => any) | undefined;
7
+ "onSplit-click"?: (() => any) | undefined;
8
+ }>, {
9
+ iconPosition: import('../interfaces/IBaseButton').IconPosition;
10
+ variant: import('../interfaces/IBaseButton').ButtonVariant;
11
+ size: import('../interfaces/IBaseButton').ButtonSize;
12
+ state: import('../interfaces/IBaseButton').ButtonState;
13
+ disabled: boolean;
14
+ loading: boolean;
15
+ fullWidth: boolean;
16
+ split: boolean;
17
+ dropdown: boolean;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
19
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { IBaseInputProps, InputState } from '../interfaces/IBaseInput';
2
+ declare const _default: import('vue').DefineComponent<IBaseInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ "update:modelValue": (value: string) => any;
4
+ }, string, import('vue').PublicProps, Readonly<IBaseInputProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
6
+ }>, {
7
+ variant: import('../interfaces/IBaseInput').InputVariant;
8
+ size: import('../interfaces/IBaseInput').InputSize;
9
+ state: InputState;
10
+ disabled: boolean;
11
+ fullWidth: boolean;
12
+ readonly: boolean;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
14
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import { IBaseLoginFormProps } from '../interfaces/IBaseLoginForm';
2
+ import { AuthProvider } from '../interfaces/IBaseAuthProviderChip';
3
+ declare const _default: import('vue').DefineComponent<IBaseLoginFormProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
4
+ submit: (payload: {
5
+ login: string;
6
+ password: string;
7
+ }) => any;
8
+ provider: (provider: AuthProvider) => any;
9
+ }, string, import('vue').PublicProps, Readonly<IBaseLoginFormProps> & Readonly<{
10
+ onSubmit?: ((payload: {
11
+ login: string;
12
+ password: string;
13
+ }) => any) | undefined;
14
+ onProvider?: ((provider: AuthProvider) => any) | undefined;
15
+ }>, {
16
+ loading: boolean;
17
+ dark: boolean;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
19
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { IBaseSnackbarProps } from '../interfaces/IBaseSnackbar';
2
+ declare const _default: import('vue').DefineComponent<IBaseSnackbarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ close: () => any;
4
+ }, string, import('vue').PublicProps, Readonly<IBaseSnackbarProps> & Readonly<{
5
+ onClose?: (() => any) | undefined;
6
+ }>, {
7
+ variant: import('../interfaces/IBaseSnackbar').SnackbarVariant;
8
+ duration: number;
9
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
10
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { default as BaseButton } from './components/BaseButton.vue';
2
+ import { default as BaseInput } from './components/BaseInput.vue';
3
+ import { default as BaseSnackbar } from './components/BaseSnackbar.vue';
4
+ import { default as BaseLoginForm } from './components/BaseLoginForm.vue';
5
+ import { IBaseButtonProps, ButtonVariant, ButtonSize, ButtonState, IconPosition } from './interfaces/IBaseButton';
6
+ import { IBaseInputProps, InputVariant, InputSize, InputState } from './interfaces/IBaseInput';
7
+ import { IBaseSnackbarProps, SnackbarVariant } from './interfaces/IBaseSnackbar';
8
+ export { BaseButton, BaseInput, BaseSnackbar, BaseLoginForm };
9
+ export type { IBaseButtonProps, ButtonVariant, ButtonSize, ButtonState, IconPosition, IBaseInputProps, InputVariant, InputSize, InputState, IBaseSnackbarProps, SnackbarVariant, };
@@ -0,0 +1,5 @@
1
+ export interface IBaseAuthProviderChipProps {
2
+ provider: AuthProvider;
3
+ dark?: boolean;
4
+ }
5
+ export type AuthProvider = 'google' | 'microsoft' | 'apple';
@@ -0,0 +1,18 @@
1
+ export interface IBaseButtonProps {
2
+ label?: string;
3
+ icon?: string;
4
+ iconPosition?: IconPosition;
5
+ badge?: string | number;
6
+ variant?: ButtonVariant;
7
+ size?: ButtonSize;
8
+ state?: ButtonState;
9
+ disabled?: boolean;
10
+ loading?: boolean;
11
+ fullWidth?: boolean;
12
+ split?: boolean;
13
+ dropdown?: boolean;
14
+ }
15
+ export type ButtonVariant = 'solid' | 'outline' | 'ghost';
16
+ export type ButtonSize = 'compact' | 'cozy';
17
+ export type ButtonState = 'neutral' | 'error' | 'warning' | 'success' | 'info';
18
+ export type IconPosition = 'left' | 'right';
@@ -0,0 +1,14 @@
1
+ export type InputVariant = 'underline' | 'outlined';
2
+ export type InputState = 'default' | 'hover' | 'focus' | 'disabled';
3
+ export type InputSize = 'sm' | 'md' | 'lg';
4
+ export interface IBaseInputProps {
5
+ modelValue: string;
6
+ label?: string;
7
+ placeholder?: string;
8
+ variant?: InputVariant;
9
+ state?: InputState;
10
+ size?: InputSize;
11
+ fullWidth?: boolean;
12
+ readonly?: boolean;
13
+ disabled?: boolean;
14
+ }
@@ -0,0 +1,4 @@
1
+ export interface IBaseLoginFormProps {
2
+ dark?: boolean;
3
+ loading?: boolean;
4
+ }
@@ -0,0 +1,7 @@
1
+ export interface IBaseSnackbarProps {
2
+ title: string;
3
+ message: string;
4
+ variant?: SnackbarVariant;
5
+ duration?: number;
6
+ }
7
+ export type SnackbarVariant = 'success' | 'warning' | 'critical';
@@ -0,0 +1,9 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import { default as BaseAuthProviderChip } from '../../components/BaseAuthProviderChip.vue';
3
+ declare const meta: Meta<typeof BaseAuthProviderChip>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BaseAuthProviderChip>;
6
+ export declare const Google: Story;
7
+ export declare const Microsoft: Story;
8
+ export declare const Apple: Story;
9
+ export declare const DarkMode: Story;
@@ -0,0 +1,22 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import { default as BaseButton } from '../../components/BaseButton.vue';
3
+ declare const meta: Meta<typeof BaseButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BaseButton>;
6
+ export declare const SolidNeutral: Story;
7
+ export declare const OutlineNeutral: Story;
8
+ export declare const GhostNeutral: Story;
9
+ export declare const Error: Story;
10
+ export declare const Warning: Story;
11
+ export declare const Success: Story;
12
+ export declare const Info: Story;
13
+ export declare const Compact: Story;
14
+ export declare const Cozy: Story;
15
+ export declare const IconLeft: Story;
16
+ export declare const IconRight: Story;
17
+ export declare const OnlyIcon: Story;
18
+ export declare const WithBadge: Story;
19
+ export declare const SplitButton: Story;
20
+ export declare const FullWidth: Story;
21
+ export declare const Loading: Story;
22
+ export declare const Disabled: Story;
@@ -0,0 +1,18 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import { default as BaseInput } from '../../components/BaseInput.vue';
3
+ declare const meta: Meta<typeof BaseInput>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BaseInput>;
6
+ export declare const Underline: Story;
7
+ export declare const Outlined: Story;
8
+ export declare const Default: Story;
9
+ export declare const Hover: Story;
10
+ export declare const Focus: Story;
11
+ export declare const Disabled: Story;
12
+ export declare const Small: Story;
13
+ export declare const Medium: Story;
14
+ export declare const Large: Story;
15
+ export declare const WithLabel: Story;
16
+ export declare const WithPlaceholder: Story;
17
+ export declare const FullWidth: Story;
18
+ export declare const Readonly: Story;
@@ -0,0 +1,10 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import { default as BaseSnackbar } from '../../components/BaseSnackbar.vue';
3
+ declare const meta: Meta<typeof BaseSnackbar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BaseSnackbar>;
6
+ export declare const Success: Story;
7
+ export declare const Warning: Story;
8
+ export declare const Critical: Story;
9
+ export declare const ShortDuration: Story;
10
+ export declare const LongDuration: Story;
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/vue3-vite';
2
+ import { default as BaseLoginForm } from '../../components/BaseLoginForm.vue';
3
+ declare const meta: Meta<typeof BaseLoginForm>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BaseLoginForm>;
6
+ export declare const Default: Story;
7
+ export declare const DarkMode: Story;
8
+ export declare const Loading: Story;
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap";[data-v-0ce8be12]{font-family:Mulish,sans-serif}span[data-v-0ce8be12],form[data-v-0ce8be12],label[data-v-0ce8be12],header[data-v-0ce8be12],body[data-v-0ce8be12],section[data-v-0ce8be12]{margin:0;padding:0;border:0;font-size:100%;text-decoration:none;font:inherit;vertical-align:baseline}button[data-v-0ce8be12]{border:none;background:none}input[data-v-0ce8be12]:focus{outline:none;border:2px solid #2ecc71;box-shadow:0 0 5px #2ecc71}.base-button-wrapper[data-v-0ce8be12]{display:inline-flex;align-items:stretch}.base-button-wrapper.full-width[data-v-0ce8be12]{width:100%}.base-button-wrapper.split .base-button[data-v-0ce8be12]:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.base-button-wrapper.split .split-button[data-v-0ce8be12]{border-top-left-radius:0;border-bottom-left-radius:0;width:40px}.base-button[data-v-0ce8be12]{position:relative;border:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;font-weight:500;border-radius:8px;transition:all .2s ease;box-shadow:0 1px 2px #00000040;width:100%}.base-button.icon-only[data-v-0ce8be12]{padding:0 12px}.base-button[data-v-0ce8be12]:disabled{opacity:.6;cursor:not-allowed}.base-button[data-v-0ce8be12]:focus-visible{outline:none;box-shadow:0 0 0 3px #2f54d326}.size-compact[data-v-0ce8be12]{height:32px;font-size:14px}.size-cozy[data-v-0ce8be12]{height:40px;font-size:16px}.variant-solid[data-v-0ce8be12]{color:#fff}.variant-outline[data-v-0ce8be12]{background:transparent;border:1px solid}.variant-ghost[data-v-0ce8be12]{background:transparent}.state-neutral.variant-solid[data-v-0ce8be12]{background:#00aa76}.state-neutral.variant-solid[data-v-0ce8be12]:hover{background:#017955}.state-neutral.variant-outline[data-v-0ce8be12]{border-color:#00aa76;color:#00aa76}.state-neutral.variant-outline[data-v-0ce8be12]:hover{background:#00aa7615}.state-neutral.variant-ghost[data-v-0ce8be12]{color:#00aa76}.state-neutral.variant-ghost[data-v-0ce8be12]:hover{background:#00aa7615}.state-success.variant-solid[data-v-0ce8be12]{background:#017a74}.state-success.variant-solid[data-v-0ce8be12]:hover{background:#044946}.state-success.variant-outline[data-v-0ce8be12]{border-color:#017a74;color:#017a74}.state-success.variant-outline[data-v-0ce8be12]:hover{background:#01707426}.state-success.variant-ghost[data-v-0ce8be12]{color:#017a74}.state-success.variant-ghost[data-v-0ce8be12]:hover{background:#01707426}.state-warning.variant-solid[data-v-0ce8be12]{background:#f6cb5c;color:#1a1a1a}.state-warning.variant-solid[data-v-0ce8be12]:hover{background:#9f7509}.state-warning.variant-outline[data-v-0ce8be12]{border-color:#f6cb5c;color:#f6cb5c}.state-warning.variant-outline[data-v-0ce8be12]:hover{background:#f6cb5c26}.state-warning.variant-ghost[data-v-0ce8be12]{color:#f6cb5c}.state-warning.variant-ghost[data-v-0ce8be12]:hover{background:#f6cb5c26}.state-error.variant-solid[data-v-0ce8be12]{background:#c93f58}.state-error.variant-solid[data-v-0ce8be12]:hover{background:#a62f44}.state-error.variant-outline[data-v-0ce8be12]{border-color:#c93f58;color:#c93f58}.state-error.variant-outline[data-v-0ce8be12]:hover{background:#c93f5826}.state-error.variant-ghost[data-v-0ce8be12]{color:#c93f58}.state-error.variant-ghost[data-v-0ce8be12]:hover{background:#c93f5826}.state-info.variant-solid[data-v-0ce8be12]{background:#00aa76}.state-info.variant-solid[data-v-0ce8be12]:hover{background:#017955}.state-info.variant-outline[data-v-0ce8be12]{border-color:#00aa76;color:#00aa76}.state-info.variant-outline[data-v-0ce8be12]:hover{background:#00aa7615}.state-info.variant-ghost[data-v-0ce8be12]{color:#00aa76}.state-info.variant-ghost[data-v-0ce8be12]:hover{background:#00aa7615}.btn-icon[data-v-0ce8be12]{font-size:16px}.btn-badge[data-v-0ce8be12]{background:#fff;color:#1a1a1a;border-radius:999px;padding:0 6px;font-size:12px;font-weight:600}.spinner[data-v-0ce8be12]{width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin-0ce8be12 .6s linear infinite}@keyframes spin-0ce8be12{to{transform:rotate(360deg)}}[data-v-f4861b50]{font-family:Mulish,sans-serif}span[data-v-f4861b50],form[data-v-f4861b50],label[data-v-f4861b50],header[data-v-f4861b50],body[data-v-f4861b50],section[data-v-f4861b50]{margin:0;padding:0;border:0;font-size:100%;text-decoration:none;font:inherit;vertical-align:baseline}button[data-v-f4861b50]{border:none;background:none}input[data-v-f4861b50]:focus{outline:none;border:2px solid #2ecc71;box-shadow:0 0 5px #2ecc71}.base-input[data-v-f4861b50]{display:inline-flex;flex-direction:column;gap:4px;width:auto}.base-input--full[data-v-f4861b50]{width:100%}.base-input__label[data-v-f4861b50]{font-size:14px;color:#5e5e5e}.base-input__field[data-v-f4861b50]{border:none;outline:none;font-size:14px;padding:6px 8px;background:transparent;color:#000c;transition:all .2s ease}.base-input__field[data-v-f4861b50]::placeholder{color:#999}.base-input--underline .base-input__field[data-v-f4861b50]{border-bottom:1px solid #cccccc}.base-input--underline.base-input--hover .base-input__field[data-v-f4861b50]{border-bottom-color:#00aa76}.base-input--underline.base-input--focus .base-input__field[data-v-f4861b50]{border-bottom:2px solid #00aa76}.base-input--outlined .base-input__field[data-v-f4861b50]{border:1px solid #cccccc;border-radius:6px;background:#f9f9f9}.base-input--outlined.base-input--hover .base-input__field[data-v-f4861b50]{border-color:#00aa76;background:#00aa7615}.base-input--outlined.base-input--focus .base-input__field[data-v-f4861b50]{border:2px solid #00aa76;background:#fff;box-shadow:0 0 0 3px #00aa7615}.base-input--sm .base-input__field[data-v-f4861b50]{font-size:12px;padding:4px 6px}.base-input--md .base-input__field[data-v-f4861b50]{font-size:14px;padding:6px 8px}.base-input--lg .base-input__field[data-v-f4861b50]{font-size:16px;padding:10px 12px}.base-input--disabled .base-input__field[data-v-f4861b50]{background:#f0f0f0;border-color:#e0e0e0;color:#999;cursor:not-allowed;opacity:.7}.base-input--disabled .base-input__field[data-v-f4861b50]::placeholder{color:#ccc}*{font-family:Mulish,sans-serif}span,form,label,header,body,section{margin:0;padding:0;border:0;font-size:100%;text-decoration:none;font:inherit;vertical-align:baseline}button{border:none;background:none}input:focus{outline:none;border:2px solid #2ecc71;box-shadow:0 0 5px #2ecc71}.base-snackbar{display:flex;align-items:center;gap:16px;padding:16px 20px;border-radius:8px;color:#fff;box-shadow:0 8px 24px #00000040;opacity:1;transform:translateY(0);transition:opacity .4s ease,transform .4s ease}.base-snackbar--hide{opacity:0;transform:translateY(-8px)}.base-snackbar__icon{font-size:28px;display:flex;align-items:center}.base-snackbar__content{display:flex;flex-direction:column;flex:1}.base-snackbar__title{font-size:14px;font-weight:600}.base-snackbar__message{font-size:13px;opacity:.9}.base-snackbar__close{background:transparent;border:none;color:#fff;font-size:14px;cursor:pointer;display:flex;align-items:center;gap:6px}.base-snackbar__close:hover{opacity:.85}.base-snackbar--success{background:#017a74}.base-snackbar--warning{background:#f6cb5c;color:#1a1a1a}.base-snackbar--warning .base-snackbar__close{color:#1a1a1a}.base-snackbar--critical{background:#c93f58}[data-v-b6215df6]{font-family:Mulish,sans-serif}span[data-v-b6215df6],form[data-v-b6215df6],label[data-v-b6215df6],header[data-v-b6215df6],body[data-v-b6215df6],section[data-v-b6215df6]{margin:0;padding:0;border:0;font-size:100%;text-decoration:none;font:inherit;vertical-align:baseline}button[data-v-b6215df6]{border:none;background:none}input[data-v-b6215df6]:focus{outline:none;border:2px solid #2ecc71;box-shadow:0 0 5px #2ecc71}.auth-chip[data-v-b6215df6]{display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:24px;border:1px solid #e0e0e0;background:#fff;color:#444;font-size:14px;cursor:pointer;transition:all .2s ease}.auth-chip[data-v-b6215df6]:hover{background:#f0f0f0}.auth-chip--dark[data-v-b6215df6]{background:#1a1a1a;border-color:#444;color:#fff}.auth-chip--dark[data-v-b6215df6]:hover{background:#2b2b2b}[data-v-b1287f25]{font-family:Mulish,sans-serif}span[data-v-b1287f25],form[data-v-b1287f25],label[data-v-b1287f25],header[data-v-b1287f25],body[data-v-b1287f25],section[data-v-b1287f25]{margin:0;padding:0;border:0;font-size:100%;text-decoration:none;font:inherit;vertical-align:baseline}button[data-v-b1287f25]{border:none;background:none}input[data-v-b1287f25]:focus{outline:none;border:2px solid #2ecc71;box-shadow:0 0 5px #2ecc71}.login-form[data-v-b1287f25]{width:320px;padding:40px;border-radius:20px;background:#f9f9f9;display:flex;flex-direction:column;gap:16px;box-shadow:0 12px 32px #00000040}.login-form--dark[data-v-b1287f25]{background:#1a1a1a}.login-form--dark h2[data-v-b1287f25]{color:#fff}.login-form--dark p[data-v-b1287f25]{color:#999}.login-form__title[data-v-b1287f25]{text-align:center;font-size:22px;font-weight:600;margin:0}.login-form__subtitle[data-v-b1287f25]{text-align:center;font-size:14px;color:#666;margin:0}.login-form__divider[data-v-b1287f25]{display:flex;align-items:center;gap:10px;color:#999;font-size:12px}.login-form__divider[data-v-b1287f25]:before,.login-form__divider[data-v-b1287f25]:after{content:"";flex:1;height:1px;background:#e0e0e0}.login-form__providers[data-v-b1287f25]{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "tax4all-components",
3
+ "private": false,
4
+ "version": "0.1.0",
5
+ "files": [
6
+ "deploy/dist"
7
+ ],
8
+ "main": "deploy/dist/index.umd.cjs",
9
+ "module": "deploy/dist/index.js",
10
+ "types": "deploy/dist/index.d.ts",
11
+ "style": "deploy/dist/style.css",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./deploy/dist/index.d.ts",
15
+ "import": "./deploy/dist/index.js",
16
+ "require": "./deploy/dist/index.umd.cjs",
17
+ "default": "./deploy/dist/index.js"
18
+ },
19
+ "./style.css": "./deploy/dist/style.css"
20
+ },
21
+ "type": "module",
22
+ "scripts": {
23
+ "dev": "vite build --watch",
24
+ "build": "vite build",
25
+ "preview": "vite preview",
26
+ "test": "vitest",
27
+ "build-only": "vite build",
28
+ "type-check": "vue-tsc --build --force",
29
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
30
+ "format": "prettier --write src/",
31
+ "storybook": "storybook dev -p 6006",
32
+ "build-storybook": "storybook build"
33
+ },
34
+ "peerDependencies": {
35
+ "vue": "^3.4.29",
36
+ "vue-tsc": "^2.0.21"
37
+ },
38
+ "devDependencies": {
39
+ "@rushstack/eslint-patch": "^1.8.0",
40
+ "@storybook/vue3-vite": "^10.1.4",
41
+ "@tsconfig/node20": "^20.1.4",
42
+ "@types/jsdom": "^21.1.7",
43
+ "@types/node": "^20.14.5",
44
+ "@vitejs/plugin-vue": "^5.0.5",
45
+ "@vue/eslint-config-prettier": "^9.0.0",
46
+ "@vue/eslint-config-typescript": "^13.0.0",
47
+ "@vue/test-utils": "^2.4.6",
48
+ "@vue/tsconfig": "^0.5.1",
49
+ "eslint": "^8.57.0",
50
+ "eslint-plugin-vue": "^9.23.0",
51
+ "npm-run-all2": "^6.2.0",
52
+ "prettier": "^3.2.5",
53
+ "sass": "^1.89.2",
54
+ "typescript": "~5.4.0",
55
+ "vite": "^5.3.1",
56
+ "vite-plugin-dts": "^4.5.4",
57
+ "vitest": "^1.6.0",
58
+ "vue": "^3.4.29"
59
+ },
60
+ "optionalDependencies": {
61
+ "@rollup/rollup-linux-x64-gnu": "^4.20.0"
62
+ },
63
+ "dependencies": {
64
+ "@storybook/addon-styling-webpack": "^3.0.0",
65
+ "@storybook/builder-vite": "^10.1.4",
66
+ "@storybook/vue3": "^10.1.4",
67
+ "storybook": "^10.1.4"
68
+ },
69
+ "description": "pacote de componentes vue",
70
+ "directories": {
71
+ "doc": "docs"
72
+ },
73
+ "author": "joao.tag",
74
+ "license": "ISC"
75
+ }