@caipira/tamandua 0.0.16 → 0.0.17

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,6 @@
1
+ import { _ as o } from "./Button.vue_vue_type_style_index_0_scoped_4208c238_lang-Blwygh_-.js";
2
+ import { _ as t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4208c238"]]);
4
+ export {
5
+ a as B
6
+ };
package/dist/Button.css CHANGED
@@ -1 +1 @@
1
- .transparent-button[data-v-a7163a38]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
1
+ .transparent-button[data-v-4208c238]:hover{background-color:rgb(from var(--caipira-primary) r g b / 45%)}
package/dist/Button.js CHANGED
@@ -1,5 +1,5 @@
1
- import { B as r } from "./Button-DeCF4Zyy.js";
2
- import { p } from "./plugin-COLD82gG.js";
1
+ import { B as r } from "./Button-42CN8gSf.js";
2
+ import { p } from "./plugin-CHQRlAGJ.js";
3
3
  export {
4
4
  r as Button,
5
5
  p as ButtonPlugin
@@ -0,0 +1,150 @@
1
+ import './Button.css';
2
+ import { defineComponent as I, getCurrentInstance as N, ref as f, computed as c, resolveComponent as w, openBlock as s, createBlock as y, resolveDynamicComponent as x, normalizeClass as b, unref as a, withCtx as M, renderSlot as F, createCommentVNode as u, createElementBlock as h, Fragment as G, createTextVNode as k, toDisplayString as P } from "vue";
3
+ import { u as X } from "./useDomHelpers-5CFMo6bx.js";
4
+ import { c as t, a as i, b as v, B as r } from "./ui-D3dPdT4S.js";
5
+ import "./Icon.vue_vue_type_script_setup_true_lang-CqJ-D4BM.js";
6
+ const O = ["multiple"], K = /* @__PURE__ */ I({
7
+ name: "TButton",
8
+ __name: "Button",
9
+ props: {
10
+ icon: {},
11
+ type: { default: t.BUTTON },
12
+ size: { default: i.DEFAULT },
13
+ label: { default: "" },
14
+ shape: { default: v.ROUNDED },
15
+ variant: { default: r.DEFAULT },
16
+ outline: { type: Boolean, default: !1 },
17
+ multiple: { type: Boolean, default: !1 },
18
+ disabled: { type: Boolean, default: !1 },
19
+ sizeClass: { default: void 0 }
20
+ },
21
+ emits: ["upload"],
22
+ setup(A, { expose: E, emit: g }) {
23
+ const e = A, L = g, p = N(), d = f(), m = f(null), { isPopoverActivator: R, onPopoverActivatorClick: T } = X(), l = c(
24
+ () => typeof e.sizeClass == "string"
25
+ ), S = c(() => {
26
+ switch (e.type) {
27
+ case t.SUBMIT:
28
+ return "submit";
29
+ case t.BUTTON:
30
+ case t.FILE:
31
+ default:
32
+ return "button";
33
+ }
34
+ }), C = c(() => e.type === t.SUBMIT ? e.label : void 0), z = c(() => {
35
+ switch (e.type) {
36
+ case t.SUBMIT:
37
+ return "input";
38
+ case t.BUTTON:
39
+ case t.FILE:
40
+ default:
41
+ return "button";
42
+ }
43
+ }), U = (o) => {
44
+ p && R(p) && T(o, p), e.type === t.SUBMIT && o.preventDefault(), e.type === t.FILE && d.value?.click();
45
+ }, _ = (o) => {
46
+ o.stopPropagation();
47
+ const n = o.target.files;
48
+ !n || !n.length || L("upload", n);
49
+ }, B = c(() => {
50
+ switch (e.size) {
51
+ case i.EXTRA_SMALL:
52
+ return 12;
53
+ case i.SMALL:
54
+ return 16;
55
+ case i.DEFAULT:
56
+ return 20;
57
+ case i.LARGE:
58
+ return 24;
59
+ case i.EXTRA_LARGE:
60
+ return 28;
61
+ default:
62
+ return 20;
63
+ }
64
+ });
65
+ return E({ iconReference: m }), (o, D) => {
66
+ const n = w("t-icon");
67
+ return s(), y(x(z.value), {
68
+ type: S.value,
69
+ value: C.value,
70
+ disabled: e.disabled,
71
+ class: b([{
72
+ // Size
73
+ "text-xs px-2 h-4": !l.value && e.size === a(i).EXTRA_SMALL,
74
+ "text-sm px-3 h-7": !l.value && e.size === a(i).SMALL,
75
+ "text-base px-4 h-9": !l.value && e.size === a(i).DEFAULT,
76
+ "text-lg px-5 h-12": !l.value && e.size === a(i).LARGE,
77
+ "text-xl px-6 h-14": !l.value && e.size === a(i).EXTRA_LARGE,
78
+ [e.sizeClass]: l.value,
79
+ // Border
80
+ border: e.outline,
81
+ // Shape
82
+ "rounded-full": e.shape === a(v).CIRCLE,
83
+ "input-roundness": e.shape === a(v).ROUNDED,
84
+ // Disabled
85
+ "cursor-not-allowed opacity-50": e.disabled,
86
+ // Default color
87
+ "border-caipira-primary-inverted fill-caipira-primary-inverted": e.variant === a(r).DEFAULT,
88
+ "bg-transparent color-caipira-primary-inverted hover:bg-caipira-primary-inverted hover:color-caipira-primary hover:fill-white": e.variant === a(r).DEFAULT && e.outline,
89
+ "bg-caipira-primary-inverted color-caipira-primary": e.variant === a(r).DEFAULT && !e.outline,
90
+ // Primary color
91
+ "fill-caipira-primary": e.variant === a(r).PRIMARY,
92
+ "bg-transparent border-caipira-blue color-caipira-blue hover:bg-caipira-blue hover:color-caipira-primary hover:fill-white": e.variant === a(r).PRIMARY && e.outline,
93
+ "bg-caipira-blue color-caipira-primary": e.variant === a(r).PRIMARY && !e.outline,
94
+ // Success color
95
+ "fill-caipira-green": e.variant === a(r).SUCCESS,
96
+ "bg-transparent border-caipira-green color-caipira-green hover:bg-caipira-green hover:color-caipira-primary hover:fill-white": e.variant === a(r).SUCCESS && e.outline,
97
+ "bg-caipira-green color-caipira-primary": e.variant === a(r).SUCCESS && !e.outline,
98
+ // Warning color
99
+ "fill-caipira-yellow": e.variant === a(r).WARNING,
100
+ "bg-transparent border-caipira-yellow color-caipira-yellow hover:bg-caipira-yellow hover:color-caipira-primary hover:fill-white": e.variant === a(r).WARNING && e.outline,
101
+ "bg-caipira-yellow color-caipira-primary": e.variant === a(r).WARNING && !e.outline,
102
+ // Danger color
103
+ "fill-caipira-red": e.variant === a(r).DANGER,
104
+ "bg-transparent border-caipira-red color-caipira-red hover:bg-caipira-red hover:color-caipira-primary hover:fill-white": e.variant === a(r).DANGER && e.outline,
105
+ "bg-caipira-red color-caipira-primary": e.variant === a(r).DANGER && !e.outline,
106
+ // Link
107
+ "color-caipira-primary-inverted underline font-bold": e.variant === a(r).LINK,
108
+ // Transparent
109
+ "transparent-button": e.variant === a(r).TRANSPARENT
110
+ }, "input-outline flex items-center select-none whitespace-nowrap"]),
111
+ role: "button",
112
+ onClick: U
113
+ }, {
114
+ default: M(() => [
115
+ F(o.$slots, "default", {}, void 0, !0),
116
+ e.icon ? (s(), y(n, {
117
+ key: 0,
118
+ ref_key: "iconReference",
119
+ ref: m,
120
+ size: B.value,
121
+ icon: e.icon,
122
+ class: b({
123
+ "mr-1": e.size === a(i).EXTRA_SMALL,
124
+ "mr-1.5": e.size === a(i).SMALL,
125
+ "mr-2": e.size === a(i).DEFAULT,
126
+ "mr-2.5": e.size === a(i).LARGE,
127
+ "mr-3": e.size === a(i).EXTRA_LARGE
128
+ })
129
+ }, null, 8, ["size", "icon", "class"])) : u("", !0),
130
+ e.label && e.type !== a(t).SUBMIT ? (s(), h(G, { key: 1 }, [
131
+ k(P(e.label), 1)
132
+ ], 64)) : u("", !0),
133
+ e.type === "file" ? (s(), h("input", {
134
+ key: 2,
135
+ multiple: e.multiple,
136
+ type: "file",
137
+ ref_key: "fileInput",
138
+ ref: d,
139
+ class: "hidden",
140
+ onChange: _
141
+ }, null, 40, O)) : u("", !0)
142
+ ]),
143
+ _: 3
144
+ }, 8, ["type", "value", "disabled", "class"]);
145
+ };
146
+ }
147
+ });
148
+ export {
149
+ K as _
150
+ };
@@ -1,5 +1,5 @@
1
- import { _ as p } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-DmgukPA3.js";
2
- import { p as n } from "./plugin-DUL0zZRF.js";
1
+ import { _ as p } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-CCdkF36R.js";
2
+ import { p as n } from "./plugin-1JFePZNV.js";
3
3
  export {
4
4
  p as ButtonCopy,
5
5
  n as ButtonCopyPlugin
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as u, ref as c, resolveComponent as f, openBlock as m, createBlock as y } from "vue";
2
2
  import { g as i } from "./index-CVD_wAsU.js";
3
3
  import { u as _ } from "./useClipboard-BHFD0Jvv.js";
4
- import "./Button.vue_vue_type_style_index_0_scoped_a7163a38_lang-D-r4SBjw.js";
4
+ import "./Button.vue_vue_type_style_index_0_scoped_4208c238_lang-Blwygh_-.js";
5
5
  const v = /* @__PURE__ */ u({
6
6
  name: "TButtonCopy",
7
7
  __name: "ButtonCopy",
@@ -1,5 +1,5 @@
1
- import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-OXLtnWrh.js";
2
- import { p as a } from "./plugin-BT8Zxuqh.js";
1
+ import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-B-x3dFWK.js";
2
+ import { p as a } from "./plugin-PahpuGjl.js";
3
3
  export {
4
4
  s as InputPassword,
5
5
  a as InputPasswordPlugin
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as ee, ref as S, inject as te, watch as ne, resolveComponent as O, openBlock as k, createElementBlock as L, normalizeClass as T, unref as U, createElementVNode as P, createVNode as q, createCommentVNode as N, withKeys as le, createBlock as se, toDisplayString as oe } from "vue";
2
- import { _ as ae } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-DmgukPA3.js";
2
+ import { _ as ae } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-CCdkF36R.js";
3
3
  import { f as re } from "./index-CjvqeRf7.js";
4
4
  const ie = (s) => {
5
5
  let e = 0, r = 0, l = 0, i = 0, o = 0, u = 0, m = 0, p = 0, f = 0, I = 0, c = 0, x = 0, y = 0, b = 0, M = 0, _ = 0, n = 0, d = 0, A = 2, V = 2, R = 2, g = 2, E = 3, K = 3, D = 3, W = 4, Z = 4, G = 6, B = "", $ = "", j = "", C = "Too Short";
@@ -1,7 +1,7 @@
1
1
  import { _ as a } from "./Avatar.vue_vue_type_script_setup_true_lang-BZy_UetF.js";
2
2
  import { _ as p } from "./Backdrop.vue_vue_type_script_setup_true_lang-OaEBTmYK.js";
3
- import { B as s } from "./Button-DeCF4Zyy.js";
4
- import { _ as f } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-DmgukPA3.js";
3
+ import { B as s } from "./Button-42CN8gSf.js";
4
+ import { _ as f } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-CCdkF36R.js";
5
5
  import { _ as n } from "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
6
6
  import { _ as u } from "./ChartTreemap.vue_vue_type_script_setup_true_lang-CG5aK3KH.js";
7
7
  import { D as l } from "./Drawer-omdZnBPG.js";
@@ -21,7 +21,7 @@ import { _ as H } from "./InputCheckbox.vue_vue_type_script_setup_true_lang-B5zo
21
21
  import { _ as K } from "./InputColor.vue_vue_type_script_setup_true_lang-CZ0o-B7I.js";
22
22
  import { _ as O } from "./InputDate.vue_vue_type_script_setup_true_lang-D1H0urIZ.js";
23
23
  import { _ as U } from "./InputMultiplier.vue_vue_type_script_setup_true_lang-w2RuSz1R.js";
24
- import { _ as W } from "./InputPassword.vue_vue_type_script_setup_true_lang-OXLtnWrh.js";
24
+ import { _ as W } from "./InputPassword.vue_vue_type_script_setup_true_lang-B-x3dFWK.js";
25
25
  import { _ as Y } from "./InputPhone.vue_vue_type_script_setup_true_lang-uNqXphQY.js";
26
26
  import { _ as $ } from "./InputPrice.vue_vue_type_script_setup_true_lang-BBi8qKn8.js";
27
27
  import { _ as or } from "./InputRadio.vue_vue_type_script_setup_true_lang-Dqbov2kN.js";
package/dist/index.css CHANGED
@@ -209,11 +209,14 @@
209
209
 
210
210
  /* Card */
211
211
  .card {
212
- @apply relative max-w-md w-full rounded border border-color color-text bg-caipira-primary;
212
+ @apply relative max-w-md w-full rounded border border-color color-text bg-caipira-primary p-4;
213
213
  }
214
214
  .card-grid {
215
215
  @apply flex flex-wrap justify-center md:justify-start items-stretch gap-3;
216
216
  }
217
+ .card-action {
218
+ @apply cursor-pointer absolute top-4 right-2;
219
+ }
217
220
 
218
221
  /* Page */
219
222
  .page-margin {
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-DmgukPA3.js";
2
+ import { _ as s } from "./ButtonCopy.vue_vue_type_script_setup_true_lang-CCdkF36R.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -1,5 +1,5 @@
1
1
  import { r as t } from "./register-component-B-fdqewb.js";
2
- import { B as r } from "./Button-DeCF4Zyy.js";
2
+ import { B as r } from "./Button-42CN8gSf.js";
3
3
  const s = {
4
4
  install(o) {
5
5
  t(o, r);
@@ -1,5 +1,5 @@
1
1
  import { r } from "./register-component-B-fdqewb.js";
2
- import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-OXLtnWrh.js";
2
+ import { _ as s } from "./InputPassword.vue_vue_type_script_setup_true_lang-B-x3dFWK.js";
3
3
  const m = {
4
4
  install(o) {
5
5
  r(o, s);
@@ -2,9 +2,9 @@ import "./Avatar.vue_vue_type_script_setup_true_lang-BZy_UetF.js";
2
2
  import { p } from "./plugin-DyiLV5Qf.js";
3
3
  import "vue";
4
4
  import { p as i } from "./plugin-C-iGigb_.js";
5
- import "./Button.vue_vue_type_style_index_0_scoped_a7163a38_lang-D-r4SBjw.js";
6
- import { p as o } from "./plugin-COLD82gG.js";
7
- import { p as r } from "./plugin-DUL0zZRF.js";
5
+ import "./Button.vue_vue_type_style_index_0_scoped_4208c238_lang-Blwygh_-.js";
6
+ import { p as o } from "./plugin-CHQRlAGJ.js";
7
+ import { p as r } from "./plugin-1JFePZNV.js";
8
8
  import "./transform-DSaNEFMr.js";
9
9
  import "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
10
10
  import { p as n } from "./plugin-DDXOF4cU.js";
@@ -31,7 +31,7 @@ import { p as y } from "./plugin-DaibhM02.js";
31
31
  import { p as b } from "./plugin-DppW8rQi.js";
32
32
  import { p as d } from "./plugin-DkDbha5K.js";
33
33
  import { p as T } from "./plugin-2nTovNcx.js";
34
- import { p as C } from "./plugin-BT8Zxuqh.js";
34
+ import { p as C } from "./plugin-PahpuGjl.js";
35
35
  import { p as v } from "./plugin-CGg5IOSy.js";
36
36
  import { p as G } from "./plugin-C3tFXHbZ.js";
37
37
  import { p as S } from "./plugin-BrwUi1gG.js";
package/dist/plugins.js CHANGED
@@ -2,9 +2,9 @@ import "./Avatar.vue_vue_type_script_setup_true_lang-BZy_UetF.js";
2
2
  import { p as y } from "./plugin-DyiLV5Qf.js";
3
3
  import "vue";
4
4
  import { p as C } from "./plugin-C-iGigb_.js";
5
- import "./Button.vue_vue_type_style_index_0_scoped_a7163a38_lang-D-r4SBjw.js";
6
- import { p as G } from "./plugin-COLD82gG.js";
7
- import { p as w } from "./plugin-DUL0zZRF.js";
5
+ import "./Button.vue_vue_type_style_index_0_scoped_4208c238_lang-Blwygh_-.js";
6
+ import { p as G } from "./plugin-CHQRlAGJ.js";
7
+ import { p as w } from "./plugin-1JFePZNV.js";
8
8
  import "./transform-DSaNEFMr.js";
9
9
  import "./ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js";
10
10
  import { p as D } from "./plugin-DDXOF4cU.js";
@@ -31,7 +31,7 @@ import { p as ir } from "./plugin-DaibhM02.js";
31
31
  import { p as er } from "./plugin-DppW8rQi.js";
32
32
  import { p as mr } from "./plugin-DkDbha5K.js";
33
33
  import { p as lr } from "./plugin-2nTovNcx.js";
34
- import { p as sr } from "./plugin-BT8Zxuqh.js";
34
+ import { p as sr } from "./plugin-PahpuGjl.js";
35
35
  import { p as xr } from "./plugin-CGg5IOSy.js";
36
36
  import { p as Ir } from "./plugin-C3tFXHbZ.js";
37
37
  import { p as hr } from "./plugin-BrwUi1gG.js";
package/dist/tamandua.js CHANGED
@@ -1,4 +1,4 @@
1
- import { p as n } from "./plugins-U8kWZ2P5.js";
1
+ import { p as n } from "./plugins-DVzcsSnU.js";
2
2
  const o = {
3
3
  install(s) {
4
4
  for (const i in n)
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  outline: boolean;
9
9
  variant: ButtonVariant;
10
10
  shape: ElementShape;
11
- sizeClass: string;
12
11
  };
13
12
  argTypes: {
14
13
  variant: {
@@ -11,7 +11,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
11
11
  outline: boolean;
12
12
  multiple: boolean;
13
13
  disabled: boolean;
14
- sizeClass: string;
14
+ sizeClass: undefined;
15
15
  }>, {
16
16
  iconReference: import("vue").Ref<import("vue").CreateComponentPublicInstance<Readonly<any>, {
17
17
  reference: import("vue").Ref<HTMLElement | null>;
@@ -41,7 +41,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
41
41
  outline: boolean;
42
42
  multiple: boolean;
43
43
  disabled: boolean;
44
- sizeClass: string;
44
+ sizeClass: undefined;
45
45
  }>>> & {
46
46
  onUpload?: ((val: FileList) => any) | undefined;
47
47
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",
@@ -1,6 +0,0 @@
1
- import { _ as o } from "./Button.vue_vue_type_style_index_0_scoped_a7163a38_lang-D-r4SBjw.js";
2
- import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
- const s = /* @__PURE__ */ a(o, [["__scopeId", "data-v-a7163a38"]]);
4
- export {
5
- s as B
6
- };
@@ -1,148 +0,0 @@
1
- import './Button.css';
2
- import { defineComponent as D, getCurrentInstance as I, ref as v, computed as n, resolveComponent as N, openBlock as s, createBlock as f, resolveDynamicComponent as w, normalizeClass as y, unref as r, withCtx as x, renderSlot as M, createCommentVNode as p, createElementBlock as b, Fragment as F, createTextVNode as G, toDisplayString as k } from "vue";
3
- import { u as P } from "./useDomHelpers-5CFMo6bx.js";
4
- import { c as t, a as i, b as u, B as a } from "./ui-D3dPdT4S.js";
5
- import "./Icon.vue_vue_type_script_setup_true_lang-CqJ-D4BM.js";
6
- const X = ["multiple"], H = /* @__PURE__ */ D({
7
- name: "TButton",
8
- __name: "Button",
9
- props: {
10
- icon: {},
11
- type: { default: t.BUTTON },
12
- size: { default: i.DEFAULT },
13
- label: { default: "" },
14
- shape: { default: u.ROUNDED },
15
- variant: { default: a.DEFAULT },
16
- outline: { type: Boolean, default: !1 },
17
- multiple: { type: Boolean, default: !1 },
18
- disabled: { type: Boolean, default: !1 },
19
- sizeClass: { default: "" }
20
- },
21
- emits: ["upload"],
22
- setup(h, { expose: A, emit: E }) {
23
- const e = h, L = E, c = I(), d = v(), m = v(null), { isPopoverActivator: R, onPopoverActivatorClick: T } = P(), g = n(() => {
24
- switch (e.type) {
25
- case t.SUBMIT:
26
- return "submit";
27
- case t.BUTTON:
28
- case t.FILE:
29
- default:
30
- return "button";
31
- }
32
- }), C = n(() => e.type === t.SUBMIT ? e.label : void 0), S = n(() => {
33
- switch (e.type) {
34
- case t.SUBMIT:
35
- return "input";
36
- case t.BUTTON:
37
- case t.FILE:
38
- default:
39
- return "button";
40
- }
41
- }), z = (o) => {
42
- c && R(c) && T(o, c), e.type === t.SUBMIT && o.preventDefault(), e.type === t.FILE && d.value?.click();
43
- }, U = (o) => {
44
- o.stopPropagation();
45
- const l = o.target.files;
46
- !l || !l.length || L("upload", l);
47
- }, _ = n(() => {
48
- switch (e.size) {
49
- case i.EXTRA_SMALL:
50
- return 12;
51
- case i.SMALL:
52
- return 16;
53
- case i.DEFAULT:
54
- return 20;
55
- case i.LARGE:
56
- return 24;
57
- case i.EXTRA_LARGE:
58
- return 28;
59
- default:
60
- return 20;
61
- }
62
- });
63
- return A({ iconReference: m }), (o, B) => {
64
- const l = N("t-icon");
65
- return s(), f(w(S.value), {
66
- type: g.value,
67
- value: C.value,
68
- disabled: e.disabled,
69
- class: y([{
70
- // Size
71
- "text-xs px-2 h-4": !e.sizeClass && e.size === r(i).EXTRA_SMALL,
72
- "text-sm px-3 h-7": !e.sizeClass && e.size === r(i).SMALL,
73
- "text-base px-4 h-9": !e.sizeClass && e.size === r(i).DEFAULT,
74
- "text-lg px-5 h-12": !e.sizeClass && e.size === r(i).LARGE,
75
- "text-xl px-6 h-14": !e.sizeClass && e.size === r(i).EXTRA_LARGE,
76
- [e.sizeClass]: !0,
77
- // Border
78
- border: e.outline,
79
- // Shape
80
- "rounded-full": e.shape === r(u).CIRCLE,
81
- "input-roundness": e.shape === r(u).ROUNDED,
82
- // Disabled
83
- "cursor-not-allowed opacity-50": e.disabled,
84
- // Default color
85
- "border-caipira-primary-inverted fill-caipira-primary-inverted": e.variant === r(a).DEFAULT,
86
- "bg-transparent color-caipira-primary-inverted hover:bg-caipira-primary-inverted hover:color-caipira-primary hover:fill-white": e.variant === r(a).DEFAULT && e.outline,
87
- "bg-caipira-primary-inverted color-caipira-primary": e.variant === r(a).DEFAULT && !e.outline,
88
- // Primary color
89
- "fill-caipira-primary": e.variant === r(a).PRIMARY,
90
- "bg-transparent border-caipira-blue color-caipira-blue hover:bg-caipira-blue hover:color-caipira-primary hover:fill-white": e.variant === r(a).PRIMARY && e.outline,
91
- "bg-caipira-blue color-caipira-primary": e.variant === r(a).PRIMARY && !e.outline,
92
- // Success color
93
- "fill-caipira-green": e.variant === r(a).SUCCESS,
94
- "bg-transparent border-caipira-green color-caipira-green hover:bg-caipira-green hover:color-caipira-primary hover:fill-white": e.variant === r(a).SUCCESS && e.outline,
95
- "bg-caipira-green color-caipira-primary": e.variant === r(a).SUCCESS && !e.outline,
96
- // Warning color
97
- "fill-caipira-yellow": e.variant === r(a).WARNING,
98
- "bg-transparent border-caipira-yellow color-caipira-yellow hover:bg-caipira-yellow hover:color-caipira-primary hover:fill-white": e.variant === r(a).WARNING && e.outline,
99
- "bg-caipira-yellow color-caipira-primary": e.variant === r(a).WARNING && !e.outline,
100
- // Danger color
101
- "fill-caipira-red": e.variant === r(a).DANGER,
102
- "bg-transparent border-caipira-red color-caipira-red hover:bg-caipira-red hover:color-caipira-primary hover:fill-white": e.variant === r(a).DANGER && e.outline,
103
- "bg-caipira-red color-caipira-primary": e.variant === r(a).DANGER && !e.outline,
104
- // Link
105
- "color-caipira-primary-inverted underline font-bold": e.variant === r(a).LINK,
106
- // Transparent
107
- "transparent-button": e.variant === r(a).TRANSPARENT
108
- }, "input-outline flex items-center select-none whitespace-nowrap"]),
109
- role: "button",
110
- onClick: z
111
- }, {
112
- default: x(() => [
113
- M(o.$slots, "default", {}, void 0, !0),
114
- e.icon ? (s(), f(l, {
115
- key: 0,
116
- ref_key: "iconReference",
117
- ref: m,
118
- size: _.value,
119
- icon: e.icon,
120
- class: y({
121
- "mr-1": e.size === r(i).EXTRA_SMALL,
122
- "mr-1.5": e.size === r(i).SMALL,
123
- "mr-2": e.size === r(i).DEFAULT,
124
- "mr-2.5": e.size === r(i).LARGE,
125
- "mr-3": e.size === r(i).EXTRA_LARGE
126
- })
127
- }, null, 8, ["size", "icon", "class"])) : p("", !0),
128
- e.label && e.type !== r(t).SUBMIT ? (s(), b(F, { key: 1 }, [
129
- G(k(e.label), 1)
130
- ], 64)) : p("", !0),
131
- e.type === "file" ? (s(), b("input", {
132
- key: 2,
133
- multiple: e.multiple,
134
- type: "file",
135
- ref_key: "fileInput",
136
- ref: d,
137
- class: "hidden",
138
- onChange: U
139
- }, null, 40, X)) : p("", !0)
140
- ]),
141
- _: 3
142
- }, 8, ["type", "value", "disabled", "class"]);
143
- };
144
- }
145
- });
146
- export {
147
- H as _
148
- };