tax4all-components 0.1.0 → 0.1.3

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.
@@ -1 +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"})});
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["tax4all-components"]={},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:c}){const l=t,o=c;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(d,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=>d.$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,c)=>{const l=t.__vccOpts||t;for(const[o,a]of c)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:c}){const l=t,o=c,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 d(){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:d,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"},x=e.defineComponent({__name:"BaseSnackbar",props:{title:{},message:{},variant:{default:"success"},duration:{default:4e3}},emits:["close"],setup(t,{emit:c}){const l=t,o=c,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 d(){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(()=>{d()}),(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:c}){const l=t,o=c,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(d,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"]]),M={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:c}){const l=c,o=e.ref(""),a=e.ref("");function i(){l("submit",{login:o.value,password:a.value})}function s(d){l("provider",d)}return(d,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",M,[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=x,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
1
  {
2
2
  "name": "tax4all-components",
3
3
  "private": false,
4
- "version": "0.1.0",
4
+ "version": "0.1.3",
5
+ "description": "Pacote de componentes Vue",
6
+ "author": "joao.tag",
7
+ "license": "ISC",
8
+ "type": "module",
5
9
  "files": [
6
10
  "deploy/dist"
7
11
  ],
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
+ "main": "./deploy/dist/index.umd.cjs",
13
+ "module": "./deploy/dist/index.js",
14
+ "types": "./deploy/dist/index.d.ts",
15
+ "style": "./deploy/dist/style.css",
12
16
  "exports": {
13
17
  ".": {
14
18
  "types": "./deploy/dist/index.d.ts",
15
19
  "import": "./deploy/dist/index.js",
16
- "require": "./deploy/dist/index.umd.cjs",
17
- "default": "./deploy/dist/index.js"
20
+ "require": "./deploy/dist/index.umd.cjs"
18
21
  },
19
22
  "./style.css": "./deploy/dist/style.css"
20
23
  },
21
- "type": "module",
22
24
  "scripts": {
23
25
  "dev": "vite build --watch",
24
26
  "build": "vite build",
25
27
  "preview": "vite preview",
26
28
  "test": "vitest",
27
- "build-only": "vite build",
28
29
  "type-check": "vue-tsc --build --force",
29
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
30
+ "lint": "eslint . --ext .vue,.ts --fix",
30
31
  "format": "prettier --write src/",
31
32
  "storybook": "storybook dev -p 6006",
32
33
  "build-storybook": "storybook build"
33
34
  },
34
35
  "peerDependencies": {
35
- "vue": "^3.4.29",
36
- "vue-tsc": "^2.0.21"
36
+ "vue": "^3.4.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@rushstack/eslint-patch": "^1.8.0",
@@ -48,28 +48,16 @@
48
48
  "@vue/tsconfig": "^0.5.1",
49
49
  "eslint": "^8.57.0",
50
50
  "eslint-plugin-vue": "^9.23.0",
51
- "npm-run-all2": "^6.2.0",
52
51
  "prettier": "^3.2.5",
53
52
  "sass": "^1.89.2",
54
53
  "typescript": "~5.4.0",
55
54
  "vite": "^5.3.1",
56
55
  "vite-plugin-dts": "^4.5.4",
57
56
  "vitest": "^1.6.0",
58
- "vue": "^3.4.29"
57
+ "vue": "^3.4.29",
58
+ "vue-tsc": "^3.2.5"
59
59
  },
60
60
  "optionalDependencies": {
61
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"
62
+ }
75
63
  }