@caipira/tamandua 0.0.45 → 0.0.47

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.
Files changed (60) hide show
  1. package/dist/{Button-DxCwFAWy.js → Button-DusGbcIs.js} +10 -10
  2. package/dist/Button.css +1 -1
  3. package/dist/Button.js +2 -2
  4. package/dist/Drawer-Cl9_4uHA.js +74 -0
  5. package/dist/Drawer.css +1 -1
  6. package/dist/Drawer.js +2 -2
  7. package/dist/Form.js +2 -2
  8. package/dist/{Form.vue_vue_type_script_setup_true_lang-CaCu47jH.js → Form.vue_vue_type_script_setup_true_lang-DfBtuwm7.js} +84 -87
  9. package/dist/FormItem.js +2 -2
  10. package/dist/FormItem.vue_vue_type_script_setup_true_lang-D7a8YCgS.js +64 -0
  11. package/dist/InputCheckbox.js +2 -2
  12. package/dist/InputCheckbox.vue_vue_type_style_index_0_lang-D5J-rPuH.js +49 -0
  13. package/dist/InputMultiplier.js +2 -2
  14. package/dist/{InputMultiplier.vue_vue_type_script_setup_true_lang-BFDBZk2M.js → InputMultiplier.vue_vue_type_script_setup_true_lang-BguqKGGe.js} +5 -6
  15. package/dist/InputPassword.js +2 -2
  16. package/dist/{InputPassword.vue_vue_type_script_setup_true_lang-DtP-Tv-2.js → InputPassword.vue_vue_type_script_setup_true_lang-BghMiF8B.js} +1 -1
  17. package/dist/InputRadio.js +2 -2
  18. package/dist/InputRadio.vue_vue_type_style_index_0_lang-DusKEybQ.js +35 -0
  19. package/dist/InputSwitch.js +2 -2
  20. package/dist/{InputSwitch.vue_vue_type_script_setup_true_lang-Dq_U-mFJ.js → InputSwitch.vue_vue_type_script_setup_true_lang-Q3wQlqfk.js} +1 -1
  21. package/dist/InputText.js +2 -2
  22. package/dist/InputText.vue_vue_type_script_setup_true_lang-JLAlUE_2.js +38 -0
  23. package/dist/Modal.js +2 -2
  24. package/dist/{Modal.vue_vue_type_script_setup_true_lang-aQ-G7tuI.js → Modal.vue_vue_type_script_setup_true_lang-CEaX1svl.js} +10 -10
  25. package/dist/ModalForm.js +2 -2
  26. package/dist/{ModalForm.vue_vue_type_script_setup_true_lang-B4dU1AzJ.js → ModalForm.vue_vue_type_script_setup_true_lang-RfK0Mn81.js} +13 -13
  27. package/dist/components.js +12 -12
  28. package/dist/{plugin-uMlQixCx.js → plugin-BJJ1-Os1.js} +1 -1
  29. package/dist/{plugin-BN2jubTY.js → plugin-BT2ef1QG.js} +1 -1
  30. package/dist/{plugin-DT7LVAli.js → plugin-BZOU6h10.js} +1 -1
  31. package/dist/{plugin-WcNmSb_y.js → plugin-Br-QOjhk.js} +1 -1
  32. package/dist/{plugin-D0o7F2L4.js → plugin-CNwzCYlr.js} +1 -1
  33. package/dist/{plugin-BjXXC0b-.js → plugin-CvohbpUQ.js} +1 -1
  34. package/dist/{plugin-DQ6digu2.js → plugin-DH3hMjgo.js} +1 -1
  35. package/dist/{plugin-GUvrG7aO.js → plugin-DKjcKBPg.js} +1 -1
  36. package/dist/{plugin-DmPqmScT.js → plugin-DNXazWwT.js} +1 -1
  37. package/dist/{plugin-Dz7BPW4D.js → plugin-DPCk5fFS.js} +1 -1
  38. package/dist/{plugin-D6dx276z.js → plugin-Y4yYnlO3.js} +1 -1
  39. package/dist/{plugin-DDUNw6fL.js → plugin-lYDlOt8p.js} +1 -1
  40. package/dist/{plugins-C7Uur4I5.js → plugins-DFHv5iXr.js} +17 -17
  41. package/dist/plugins.js +17 -17
  42. package/dist/tamandua.js +1 -1
  43. package/dist/types/components/Form/{form.story.d.ts → Form.story.d.ts} +7 -1
  44. package/dist/types/components/Form/Form.vue.d.ts +9 -22
  45. package/dist/types/components/Form/types.d.ts +4 -6
  46. package/dist/types/components/FormItem/FormItem.vue.d.ts +2 -16
  47. package/dist/types/components/FormItem/types.d.ts +3 -1
  48. package/dist/types/components/InputCheckbox/InputCheckbox.vue.d.ts +3 -0
  49. package/dist/types/components/InputCheckbox/types.d.ts +1 -0
  50. package/dist/types/components/InputMultiplier/InputMultiplier.vue.d.ts +0 -3
  51. package/dist/types/components/InputMultiplier/types.d.ts +0 -1
  52. package/dist/types/components/ModalForm/{model-form.story.d.ts → ModalForm.story.d.ts} +1 -1
  53. package/package.json +2 -2
  54. package/dist/Drawer-BNQfu7JD.js +0 -76
  55. package/dist/FormItem.vue_vue_type_script_setup_true_lang-CV7IVjE4.js +0 -84
  56. package/dist/InputCheckbox.vue_vue_type_style_index_0_lang-BONJ9l1D.js +0 -40
  57. package/dist/InputRadio.vue_vue_type_style_index_0_lang-IqPZ9Qzl.js +0 -35
  58. package/dist/InputText.vue_vue_type_script_setup_true_lang-D4nIMRiz.js +0 -39
  59. /package/dist/types/components/InputCheckbox/{input-checkbox.story.d.ts → Input-checkbox.story.d.ts} +0 -0
  60. /package/dist/types/components/InputPassword/{input-password.story.d.ts → Input-password.story.d.ts} +0 -0
@@ -1,19 +1,14 @@
1
1
  import { FormSubmissionFormat } from '../../enums/form.js';
2
- import { ButtonVariant } from '../../enums/ui.js';
3
2
  import { FormSchema, FormInstance } from '../../types/form.js';
4
3
  import { FormEvents } from './types.js';
5
4
 
6
5
  declare const _default: <T extends FormSchema>(__VLS_props: {
7
- id?: string | number | undefined;
8
6
  schema?: T | undefined;
9
- formStyle?: {
10
- input?: string | undefined;
11
- label?: string | undefined;
12
- } | undefined;
7
+ layout?: import('./types.js').FormLayout | undefined;
8
+ formStyle?: import('./types.js').FormStyle | undefined;
9
+ identifier?: string | number | undefined;
13
10
  showSubmit?: boolean | undefined;
14
- submitLabel?: string | undefined;
15
11
  buttonProps?: import('../types.js').ButtonProps | undefined;
16
- buttonVariant?: ButtonVariant | undefined;
17
12
  submissionFormat?: FormSubmissionFormat | undefined;
18
13
  buttonWrapperClasses?: string | undefined;
19
14
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, __VLS_ctx?: {
@@ -36,16 +31,12 @@ declare const _default: <T extends FormSchema>(__VLS_props: {
36
31
  getValue: (key: keyof import("vue").UnwrapNestedRefs<FormInstance<T extends undefined ? never : T>>) => import("vue").UnwrapNestedRefs<FormInstance<T extends undefined ? never : T>>[keyof import("vue").UnwrapNestedRefs<FormInstance<T extends undefined ? never : T>>];
37
32
  }>) => void) | undefined, __VLS_setup?: Promise<{
38
33
  props: {
39
- id?: string | number | undefined;
40
34
  schema?: T | undefined;
41
- formStyle?: {
42
- input?: string | undefined;
43
- label?: string | undefined;
44
- } | undefined;
35
+ layout?: import('./types.js').FormLayout | undefined;
36
+ formStyle?: import('./types.js').FormStyle | undefined;
37
+ identifier?: string | number | undefined;
45
38
  showSubmit?: boolean | undefined;
46
- submitLabel?: string | undefined;
47
39
  buttonProps?: import('../types.js').ButtonProps | undefined;
48
- buttonVariant?: ButtonVariant | undefined;
49
40
  submissionFormat?: FormSubmissionFormat | undefined;
50
41
  buttonWrapperClasses?: string | undefined;
51
42
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
@@ -72,16 +63,12 @@ declare const _default: <T extends FormSchema>(__VLS_props: {
72
63
  }> & {
73
64
  __ctx?: {
74
65
  props: {
75
- id?: string | number | undefined;
76
66
  schema?: T | undefined;
77
- formStyle?: {
78
- input?: string | undefined;
79
- label?: string | undefined;
80
- } | undefined;
67
+ layout?: import('./types.js').FormLayout | undefined;
68
+ formStyle?: import('./types.js').FormStyle | undefined;
69
+ identifier?: string | number | undefined;
81
70
  showSubmit?: boolean | undefined;
82
- submitLabel?: string | undefined;
83
71
  buttonProps?: import('../types.js').ButtonProps | undefined;
84
- buttonVariant?: ButtonVariant | undefined;
85
72
  submissionFormat?: FormSubmissionFormat | undefined;
86
73
  buttonWrapperClasses?: string | undefined;
87
74
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
@@ -1,19 +1,18 @@
1
1
  import { FormSubmissionFormat } from '../../enums/form.js';
2
- import { ButtonVariant } from '../../enums/ui.js';
3
2
  import { ButtonProps } from '../Button/types.js';
4
3
  import { FormSchema, FormInstance, ValidationResult } from '../../types/form.js';
5
4
 
6
- type FormStyle = {
5
+ export type FormStyle = {
7
6
  [key in "label" | "input"]?: string;
8
7
  };
8
+ export type FormLayout = "horizontal" | "vertical" | "inline";
9
9
  export type FormProps<T extends FormSchema> = {
10
- id?: string | number;
11
10
  schema?: T;
11
+ layout?: FormLayout;
12
12
  formStyle?: FormStyle;
13
+ identifier?: string | number;
13
14
  showSubmit?: boolean;
14
- submitLabel?: string;
15
15
  buttonProps?: ButtonProps;
16
- buttonVariant?: ButtonVariant;
17
16
  submissionFormat?: FormSubmissionFormat;
18
17
  buttonWrapperClasses?: string;
19
18
  };
@@ -21,4 +20,3 @@ export type FormEvents = {
21
20
  <T extends FormSubmissionFormat>(e: "submit", val: ValidationResult<T>): void;
22
21
  <T extends FormSchema>(e: "change", val: FormInstance<T>): void;
23
22
  };
24
- export {};
@@ -1,14 +1,8 @@
1
1
  import { FormItemProps } from './types.js';
2
2
 
3
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FormItemProps>, {
4
- inline: boolean;
5
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FormItemProps>, {
6
- inline: boolean;
7
- }>>>, {
8
- inline: boolean;
9
- }, {}>, {
10
- default?(_: {}): any;
3
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<FormItemProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<FormItemProps>>>, {}, {}>, {
11
4
  label?(_: {}): any;
5
+ default?(_: {}): any;
12
6
  }>;
13
7
  export default _default;
14
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -20,14 +14,6 @@ type __VLS_TypePropsToRuntimeProps<T> = {
20
14
  required: true;
21
15
  };
22
16
  };
23
- type __VLS_WithDefaults<P, D> = {
24
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
25
- default: D[K];
26
- }> : P[K];
27
- };
28
- type __VLS_Prettify<T> = {
29
- [K in keyof T]: T[K];
30
- } & {};
31
17
  type __VLS_WithTemplateSlots<T, S> = T & {
32
18
  new (): {
33
19
  $slots: S;
@@ -1,5 +1,7 @@
1
+ import { FormLayout } from '../Form/types.js';
2
+
1
3
  export type FormItemProps = {
2
4
  label: string;
3
5
  rules?: any;
4
- inline?: boolean;
6
+ layout?: FormLayout;
5
7
  };
@@ -1,6 +1,7 @@
1
1
  import { InputCheckboxProps } from './types.js';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputCheckboxProps>, {
4
+ label: string;
4
5
  disabled: boolean;
5
6
  isIndeterminate: boolean;
6
7
  initializeValue: boolean;
@@ -8,6 +9,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
8
9
  input: (args_0: boolean) => void;
9
10
  "update:model-value": (args_0: boolean) => void;
10
11
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputCheckboxProps>, {
12
+ label: string;
11
13
  disabled: boolean;
12
14
  isIndeterminate: boolean;
13
15
  initializeValue: boolean;
@@ -15,6 +17,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
15
17
  onInput?: ((args_0: boolean) => any) | undefined;
16
18
  "onUpdate:model-value"?: ((args_0: boolean) => any) | undefined;
17
19
  }, {
20
+ label: string;
18
21
  disabled: boolean;
19
22
  isIndeterminate: boolean;
20
23
  initializeValue: boolean;
@@ -1,4 +1,5 @@
1
1
  export type InputCheckboxProps = {
2
+ label?: string;
2
3
  disabled?: boolean;
3
4
  modelValue?: boolean;
4
5
  isIndeterminate?: boolean;
@@ -2,20 +2,17 @@ import { InputMultiplierProps } from './types.js';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputMultiplierProps>, {
4
4
  component: string;
5
- label: string;
6
5
  listeners: () => {};
7
6
  inputProps: () => {};
8
7
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
8
  "update:model-value": (value: any[]) => void;
10
9
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<InputMultiplierProps>, {
11
10
  component: string;
12
- label: string;
13
11
  listeners: () => {};
14
12
  inputProps: () => {};
15
13
  }>>> & {
16
14
  "onUpdate:model-value"?: ((value: any[]) => any) | undefined;
17
15
  }, {
18
- label: string;
19
16
  component: import("vue").Component | "t-input-text" | "t-input-phone";
20
17
  inputProps: any;
21
18
  listeners: {
@@ -4,7 +4,6 @@ type ComponentType = "t-input-text" | "t-input-phone" | Component;
4
4
  export type InputMultiplierProps = {
5
5
  component?: ComponentType;
6
6
  inputProps?: any;
7
- label: string;
8
7
  listeners?: {
9
8
  [key: string]: (...args: any[]) => void;
10
9
  };
@@ -21,7 +21,7 @@ export declare const ModalForm: (args: any) => {
21
21
  args: any;
22
22
  modalForm: import('vue').Ref<any>;
23
23
  onChange: () => void;
24
- openForm: () => void;
24
+ openForm: () => any;
25
25
  Form: {
26
26
  setup(): {
27
27
  schema: FormSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caipira/tamandua",
3
- "version": "0.0.45",
3
+ "version": "0.0.47",
4
4
  "private": false,
5
5
  "description": "UI library for the Caipira ecosystem",
6
6
  "license": "GPL-3.0-only",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "https://github.com/caipira-io/tamandua.git"
14
+ "url": "git+https://github.com/caipira-io/tamandua.git"
15
15
  },
16
16
  "type": "module",
17
17
  "typesVersions": {
@@ -1,76 +0,0 @@
1
- import './Drawer.css';
2
- import { defineComponent as v, ref as b, onMounted as h, resolveComponent as c, openBlock as o, createElementBlock as l, withKeys as w, createVNode as d, createElementVNode as a, normalizeClass as f, createBlock as k, createCommentVNode as r, renderSlot as n } from "vue";
3
- import { _ as x } from "./Backdrop.vue_vue_type_script_setup_true_lang-OaEBTmYK.js";
4
- import { _ as g } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const C = {
6
- key: 0,
7
- class: "flex justify-between items-center pl-4 py-1 pr-1 border-b border-color"
8
- }, $ = { class: "flex flex-col flex-1 relative overflow-y-auto scrollbar" }, z = /* @__PURE__ */ v({
9
- name: "TDrawer",
10
- __name: "Drawer",
11
- props: {
12
- title: { default: "" },
13
- style: { default: () => ({
14
- footer: ""
15
- }) },
16
- direction: { default: "rtl" },
17
- showHeader: { type: Boolean, default: !0 }
18
- },
19
- emits: ["closed"],
20
- setup(u, { emit: p }) {
21
- const t = u, m = p, i = b(null), s = (e) => {
22
- e.stopPropagation(), m("closed");
23
- };
24
- return h(() => {
25
- i.value?.focus();
26
- }), (e, B) => {
27
- const _ = c("t-graphy-subtitle"), y = c("t-button");
28
- return o(), l("div", {
29
- class: "fixed inset-0 flex items-center z-10",
30
- tabindex: "0",
31
- ref_key: "modal",
32
- ref: i,
33
- onKeyup: w(s, ["esc"])
34
- }, [
35
- d(x, { onClick: s }),
36
- a("div", {
37
- class: f(["w-[38rem] absolute inset-y-0 z-20 flex flex-col bg-caipira-primary drawer", {
38
- "right-0 drop-shadow-lg": t.direction === "ltr",
39
- "left-0": t.direction === "rtl"
40
- }])
41
- }, [
42
- t.showHeader ? (o(), l("div", C, [
43
- a("div", null, [
44
- t.title ? (o(), k(_, {
45
- key: 0,
46
- text: t.title
47
- }, null, 8, ["text"])) : r("", !0),
48
- e.$slots.header ? n(e.$slots, "header", { key: 1 }, void 0, !0) : r("", !0)
49
- ]),
50
- d(y, {
51
- variant: "transparent",
52
- class: "self-start",
53
- size: "lg",
54
- icon: "close",
55
- onClick: s
56
- })
57
- ])) : r("", !0),
58
- a("div", $, [
59
- n(e.$slots, "default", {}, void 0, !0)
60
- ]),
61
- e.$slots.footer ? (o(), l("div", {
62
- key: 1,
63
- class: f(["p-4 border-t border-color", {
64
- [e.style.footer]: !0
65
- }])
66
- }, [
67
- n(e.$slots, "footer", {}, void 0, !0)
68
- ], 2)) : r("", !0)
69
- ], 2)
70
- ], 544);
71
- };
72
- }
73
- }), E = /* @__PURE__ */ g(z, [["__scopeId", "data-v-1e2fe237"]]);
74
- export {
75
- E as D
76
- };
@@ -1,84 +0,0 @@
1
- import { defineComponent as C, useSlots as I, inject as S, computed as p, provide as $, resolveComponent as B, openBlock as t, createElementBlock as l, createElementVNode as o, normalizeClass as s, Fragment as d, unref as a, renderSlot as n, createVNode as x, withCtx as y, renderList as F, toDisplayString as N, createCommentVNode as T } from "vue";
2
- const V = { class: "w-full" }, w = {
3
- key: 0,
4
- class: "float-right"
5
- };
6
- let E = 0;
7
- const z = /* @__PURE__ */ C({
8
- name: "TFormItem",
9
- __name: "FormItem",
10
- props: {
11
- label: {},
12
- rules: {},
13
- inline: { type: Boolean, default: !0 }
14
- },
15
- setup(h) {
16
- const u = h, i = `formitem_${++E}`, c = I(), f = [], r = S("formStyle", { label: "", input: "" }), v = p(() => {
17
- if (!c || !c.default)
18
- return !1;
19
- const e = c?.default();
20
- return e ? e[0].type.name : !1;
21
- }), m = p(() => v.value === "TInputCheckbox"), _ = p(() => v.value === "TInputMultiplier");
22
- return $("id", i), (e, M) => {
23
- const b = B("t-graphy-label");
24
- return t(), l("div", V, [
25
- o("div", {
26
- class: s(["flex gap-2 my-5", {
27
- "flex-col": !u.inline,
28
- "items-center": !_.value,
29
- "items-start": _.value
30
- }])
31
- }, [
32
- m.value ? (t(), l(d, { key: 0 }, [
33
- o("div", {
34
- class: s(["text-right", { [a(r).label]: !0 }])
35
- }, [
36
- n(e.$slots, "default")
37
- ], 2),
38
- x(b, {
39
- text: u.label,
40
- for: i,
41
- class: s([{
42
- [a(r).input]: !0,
43
- "cursor-pointer": m.value
44
- }, "text-left"])
45
- }, {
46
- default: y(() => [
47
- n(e.$slots, "label")
48
- ]),
49
- _: 3
50
- }, 8, ["text", "class"])
51
- ], 64)) : (t(), l(d, { key: 1 }, [
52
- x(b, {
53
- text: u.label,
54
- for: i,
55
- class: s([{
56
- [a(r).label]: !0,
57
- "cursor-pointer": m.value
58
- }, "text-right"])
59
- }, {
60
- default: y(() => [
61
- n(e.$slots, "label")
62
- ]),
63
- _: 3
64
- }, 8, ["text", "class"]),
65
- o("div", {
66
- class: s({ [a(r).input]: !0 })
67
- }, [
68
- n(e.$slots, "default")
69
- ], 2)
70
- ], 64))
71
- ], 2),
72
- f ? (t(), l("div", w, [
73
- (t(), l(d, null, F(f, (g, k) => o("span", {
74
- class: "text-sm text-red-600",
75
- key: k
76
- }, N(g), 1)), 64))
77
- ])) : T("", !0)
78
- ]);
79
- };
80
- }
81
- });
82
- export {
83
- z as _
84
- };
@@ -1,40 +0,0 @@
1
- import './InputCheckbox.css';
2
- import { defineComponent as p, inject as s, ref as c, watch as m, withDirectives as f, openBlock as b, createElementBlock as v, mergeProps as h, unref as k, vModelCheckbox as y } from "vue";
3
- const B = ["indeterminate", "id", "disabled"], I = /* @__PURE__ */ p({
4
- name: "TInputCheckbox",
5
- __name: "InputCheckbox",
6
- props: {
7
- disabled: { type: Boolean, default: !1 },
8
- modelValue: { type: Boolean },
9
- isIndeterminate: { type: Boolean, default: !1 },
10
- initializeValue: { type: Boolean, default: !1 }
11
- },
12
- emits: ["update:model-value", "input"],
13
- setup(o, { emit: l }) {
14
- const a = o, i = l, d = s("id", ""), t = c(!1), r = () => {
15
- const e = !t.value;
16
- i("update:model-value", e), i("input", e);
17
- };
18
- return m(
19
- () => a.modelValue,
20
- (e) => {
21
- a.initializeValue && typeof e > "u" && i("update:model-value", !1), t.value = e;
22
- },
23
- { immediate: !0 }
24
- ), (e, n) => f((b(), v("input", h({
25
- "onUpdate:modelValue": n[0] || (n[0] = (u) => t.value = u)
26
- }, e.$attrs, {
27
- type: "checkbox",
28
- class: "form-checkbox w-5 h-5 border input-border input-roundness color-caipira-primary-inverted bg-caipira-primary checked:bg-caipira-primary-inverted input-outline",
29
- indeterminate: a.isIndeterminate,
30
- id: k(d),
31
- disabled: e.disabled,
32
- onInput: r
33
- }), null, 16, B)), [
34
- [y, t.value]
35
- ]);
36
- }
37
- });
38
- export {
39
- I as _
40
- };
@@ -1,35 +0,0 @@
1
- import './InputRadio.css';
2
- import { defineComponent as m, inject as e, openBlock as u, createElementBlock as b, createElementVNode as o, unref as r, toDisplayString as v } from "vue";
3
- const h = { class: "h-9 inline-flex items-center" }, f = ["value", "name", "disabled", "checked"];
4
- let _ = 0;
5
- const g = /* @__PURE__ */ m({
6
- name: "TInputRadio",
7
- __name: "InputRadio",
8
- props: {
9
- value: {},
10
- label: {}
11
- },
12
- setup(t) {
13
- const i = `radio_${++_}`, c = e("name", ""), a = t, l = e("model", ""), d = e("change", () => {
14
- }), s = e("disabled", !1);
15
- return (p, n) => (u(), b("div", h, [
16
- o("input", {
17
- value: a.value,
18
- name: r(c),
19
- id: i,
20
- disabled: r(s),
21
- checked: a.value === r(l),
22
- type: "radio",
23
- class: "form-radio w-5 h-5 border border-caipira-primary-inverted checked:hover:border-caipira-primary-inverted checked:focus:border-caipira-primary-inverted checked:border-caipira-primary-inverted input-outline focus:input-outline bg-caipira-primary color-caipira-primary",
24
- onChange: n[0] || (n[0] = (y) => r(d)(a.value))
25
- }, null, 40, f),
26
- o("label", {
27
- class: "cursor-pointer pl-2 mr-3 input-label",
28
- for: i
29
- }, v(p.label), 1)
30
- ]));
31
- }
32
- });
33
- export {
34
- g as _
35
- };
@@ -1,39 +0,0 @@
1
- import { defineComponent as r, mergeModels as u, useModel as c, inject as l, withDirectives as m, openBlock as f, createElementBlock as b, normalizeClass as v, unref as t, vModelDynamic as y } from "vue";
2
- const _ = ["type", "id", "placeholder", "autocomplete", "disabled"], M = /* @__PURE__ */ r({
3
- name: "TInputText",
4
- __name: "InputText",
5
- props: /* @__PURE__ */ u({
6
- type: { default: "text" },
7
- placeholder: { default: void 0 },
8
- autocomplete: { default: void 0 },
9
- disabled: { type: Boolean, default: !1 },
10
- disableStyle: { type: Boolean, default: !1 }
11
- }, {
12
- modelValue: {
13
- default: ""
14
- },
15
- modelModifiers: {}
16
- }),
17
- emits: /* @__PURE__ */ u(["keyup.enter"], ["update:modelValue"]),
18
- setup(o, { emit: h }) {
19
- const d = c(o, "modelValue"), e = o, p = l("id", ""), a = l("invalid", !1), i = l("validated", !1);
20
- return (x, n) => m((f(), b("input", {
21
- "onUpdate:modelValue": n[0] || (n[0] = (s) => d.value = s),
22
- type: e.type,
23
- class: v({
24
- "h-9 input-bg-color input-text-color input-outline border input-border input-roundness input-padding w-full": !e.disableStyle,
25
- "border-red-500": !t(i) && t(a),
26
- "border-emerald-500": t(i) && !t(a)
27
- }),
28
- id: t(p),
29
- placeholder: e.placeholder,
30
- autocomplete: e.autocomplete,
31
- disabled: e.disabled
32
- }, null, 10, _)), [
33
- [y, d.value]
34
- ]);
35
- }
36
- });
37
- export {
38
- M as _
39
- };