@appmax_npm/ds-prime 1.0.0-alpha.107 → 1.0.0-alpha.108

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,29 @@
1
+ import { Component, DefineComponent } from 'vue';
2
+
3
+ export interface AmRadioOptionsProps {
4
+ name: string;
5
+ options: Array<{ label: string; value: unknown }>;
6
+ modelValue?: unknown;
7
+ label?: string;
8
+ help?: string;
9
+ error?: string;
10
+ dataTestPrefix?: string;
11
+ }
12
+
13
+ export interface AmRadioOptionsSlots {}
14
+
15
+ export interface AmRadioOptionsEmits {
16
+ 'update:modelValue': (value: unknown) => void;
17
+ }
18
+
19
+ /**
20
+ * **DS Prime - AmRadioOptions**
21
+ *
22
+ * AmRadioOptions é um componente de formulário o DS Prime.
23
+ *
24
+ * [Documentação](https://appmax-space.bitbucket.io/ds-prime/componentes/AmRadioOptions.html)
25
+ */
26
+
27
+ declare const AmRadioOptions: DefineComponent<AmRadioOptionsProps, AmRadioOptionsSlots, AmRadioOptionsEmits>;
28
+
29
+ export default AmRadioOptions;
@@ -0,0 +1,65 @@
1
+ import { defineComponent as u, mergeModels as p, useModel as c, openBlock as t, createElementBlock as o, Fragment as f, renderList as _, createElementVNode as v, createVNode as s, unref as V, withCtx as $, createTextVNode as b, toDisplayString as h } from "vue";
2
+ import { RadioButton as g } from "primevue";
3
+ import { _ as k } from "../AmText.vue_vue_type_script_setup_true_lang-yjw50cPR.js";
4
+ import { _ as x } from "../AmIcon.vue_vue_type_script_setup_true_lang-DkJ2sUVG.js";
5
+ import { _ as y } from "../_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const P = { class: "space-y-2 am-radio-options" }, T = ["data-test", "for"], B = { class: "flex items-center justify-center relative" }, I = { name: "AmRadios" }, M = /* @__PURE__ */ u({
7
+ ...I,
8
+ props: /* @__PURE__ */ p({
9
+ name: {},
10
+ options: {},
11
+ modelValue: {},
12
+ label: {},
13
+ help: {},
14
+ error: {},
15
+ dataTestPrefix: { default: "am-radio-options" }
16
+ }, {
17
+ modelValue: {},
18
+ modelModifiers: {}
19
+ }),
20
+ emits: ["update:modelValue"],
21
+ setup(d) {
22
+ const n = c(d, "modelValue"), i = {
23
+ box: {
24
+ class: "!rounded-full"
25
+ },
26
+ icon: {
27
+ class: "!bg-transparent"
28
+ }
29
+ };
30
+ return (e, l) => (t(), o("div", P, [
31
+ (t(!0), o(f, null, _(e.options, (r, a) => (t(), o("label", {
32
+ class: "flex items-center gap-2 pt-2 cursor-pointer",
33
+ key: a,
34
+ "data-test": `${e.dataTestPrefix}-option-${a}`,
35
+ for: `${e.name}-${a + 1}`
36
+ }, [
37
+ v("div", B, [
38
+ s(V(g), {
39
+ modelValue: n.value,
40
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => n.value = m),
41
+ pt: i,
42
+ inputId: `${e.name}-${a + 1}`,
43
+ name: e.name,
44
+ value: r.value,
45
+ "data-test": `${e.dataTestPrefix}-input-${e.name}`
46
+ }, null, 8, ["modelValue", "inputId", "name", "value", "data-test"]),
47
+ s(x, {
48
+ class: "am-radio-options__icon absolute",
49
+ icon: "check",
50
+ size: "md"
51
+ })
52
+ ]),
53
+ s(k, { as: "span" }, {
54
+ default: $(() => [
55
+ b(h(r.label), 1)
56
+ ]),
57
+ _: 2
58
+ }, 1024)
59
+ ], 8, T))), 128))
60
+ ]));
61
+ }
62
+ }), j = /* @__PURE__ */ y(M, [["__scopeId", "data-v-3b2588ae"]]);
63
+ export {
64
+ j as default
65
+ };