@appmax_npm/ds-prime 1.0.0-alpha.108 → 1.0.0-alpha.109
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,56 @@
|
|
|
1
|
+
import { defineComponent as r, computed as s, openBlock as n, createElementBlock as c, createVNode as l, withCtx as p, createElementVNode as m, normalizeClass as d, unref as f } from "vue";
|
|
2
|
+
import { _ as u } from "./AmTooltip.vue_vue_type_script_setup_true_lang-DvhTZs1v.js";
|
|
3
|
+
import { _ } from "./AmIcon.vue_vue_type_script_setup_true_lang-DkJ2sUVG.js";
|
|
4
|
+
import { cva as x } from "class-variance-authority";
|
|
5
|
+
import { twMerge as v } from "tailwind-merge";
|
|
6
|
+
const h = x(
|
|
7
|
+
"bg-surface-100 text-color rounded-full flex items-center justify-center",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
sm: "w-6 h-6",
|
|
12
|
+
md: "w-7 h-7"
|
|
13
|
+
},
|
|
14
|
+
disabled: {
|
|
15
|
+
true: "opacity-50 cursor-not-allowed",
|
|
16
|
+
false: ""
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
), w = (o, t) => v(h(o), t), T = { class: "inline-flex" }, H = /* @__PURE__ */ r({
|
|
21
|
+
__name: "AmHelper",
|
|
22
|
+
props: {
|
|
23
|
+
text: {},
|
|
24
|
+
tooltipText: {},
|
|
25
|
+
tooltipPosition: {},
|
|
26
|
+
size: { default: "md" },
|
|
27
|
+
class: {},
|
|
28
|
+
style: {}
|
|
29
|
+
},
|
|
30
|
+
setup(o) {
|
|
31
|
+
const t = o, e = s(() => t.text || t.tooltipText), i = s(() => !!e.value);
|
|
32
|
+
return (a, z) => (n(), c("div", T, [
|
|
33
|
+
l(u, {
|
|
34
|
+
showTooltip: i.value,
|
|
35
|
+
tooltipPosition: a.tooltipPosition,
|
|
36
|
+
tooltipText: e.value
|
|
37
|
+
}, {
|
|
38
|
+
default: p(() => [
|
|
39
|
+
m("div", {
|
|
40
|
+
class: d(f(w)({ ...t, disabled: !i.value }, t.class))
|
|
41
|
+
}, [
|
|
42
|
+
l(_, {
|
|
43
|
+
variant: "material",
|
|
44
|
+
icon: "question_mark",
|
|
45
|
+
size: "sm"
|
|
46
|
+
})
|
|
47
|
+
], 2)
|
|
48
|
+
]),
|
|
49
|
+
_: 1
|
|
50
|
+
}, 8, ["showTooltip", "tooltipPosition", "tooltipText"])
|
|
51
|
+
]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
H as _
|
|
56
|
+
};
|
package/amhelper/index.js
CHANGED
|
@@ -1,56 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as u } from "../AmTooltip.vue_vue_type_script_setup_true_lang-DvhTZs1v.js";
|
|
3
|
-
import { _ } from "../AmIcon.vue_vue_type_script_setup_true_lang-DkJ2sUVG.js";
|
|
4
|
-
import { cva as x } from "class-variance-authority";
|
|
5
|
-
import { twMerge as v } from "tailwind-merge";
|
|
6
|
-
const h = x(
|
|
7
|
-
"bg-surface-100 text-color rounded-full flex items-center justify-center",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
size: {
|
|
11
|
-
sm: "w-6 h-6",
|
|
12
|
-
md: "w-7 h-7"
|
|
13
|
-
},
|
|
14
|
-
disabled: {
|
|
15
|
-
true: "opacity-50 cursor-not-allowed",
|
|
16
|
-
false: ""
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
), w = (o, t) => v(h(o), t), T = { class: "inline-flex" }, H = /* @__PURE__ */ r({
|
|
21
|
-
__name: "AmHelper",
|
|
22
|
-
props: {
|
|
23
|
-
text: {},
|
|
24
|
-
tooltipText: {},
|
|
25
|
-
tooltipPosition: {},
|
|
26
|
-
size: { default: "md" },
|
|
27
|
-
class: {},
|
|
28
|
-
style: {}
|
|
29
|
-
},
|
|
30
|
-
setup(o) {
|
|
31
|
-
const t = o, e = s(() => t.text || t.tooltipText), i = s(() => !!e.value);
|
|
32
|
-
return (a, z) => (n(), c("div", T, [
|
|
33
|
-
l(u, {
|
|
34
|
-
showTooltip: i.value,
|
|
35
|
-
tooltipPosition: a.tooltipPosition,
|
|
36
|
-
tooltipText: e.value
|
|
37
|
-
}, {
|
|
38
|
-
default: p(() => [
|
|
39
|
-
m("div", {
|
|
40
|
-
class: d(f(w)({ ...t, disabled: !i.value }, t.class))
|
|
41
|
-
}, [
|
|
42
|
-
l(_, {
|
|
43
|
-
variant: "material",
|
|
44
|
-
icon: "question_mark",
|
|
45
|
-
size: "sm"
|
|
46
|
-
})
|
|
47
|
-
], 2)
|
|
48
|
-
]),
|
|
49
|
-
_: 1
|
|
50
|
-
}, 8, ["showTooltip", "tooltipPosition", "tooltipText"])
|
|
51
|
-
]));
|
|
52
|
-
}
|
|
53
|
-
});
|
|
1
|
+
import { _ as f } from "../AmHelper.vue_vue_type_script_setup_true_lang-BYQT8u4W.js";
|
|
54
2
|
export {
|
|
55
|
-
|
|
3
|
+
f as default
|
|
56
4
|
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Component, DefineComponent } from 'vue';
|
|
2
2
|
|
|
3
|
+
export interface AmRadioOptionsItem {
|
|
4
|
+
label: string;
|
|
5
|
+
value: unknown;
|
|
6
|
+
help?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
3
9
|
export interface AmRadioOptionsProps {
|
|
4
10
|
name: string;
|
|
5
|
-
options:
|
|
11
|
+
options: AmRadioOptionsItem[];
|
|
6
12
|
modelValue?: unknown;
|
|
7
13
|
label?: string;
|
|
8
14
|
help?: string;
|
package/amradiooptions/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { defineComponent as u, mergeModels as p, useModel as c, openBlock as
|
|
1
|
+
import { defineComponent as u, mergeModels as p, useModel as c, openBlock as o, createElementBlock as s, Fragment as f, renderList as _, createElementVNode as V, createVNode as l, unref as $, withCtx as v, createTextVNode as h, toDisplayString as b, createBlock as k, createCommentVNode as x } from "vue";
|
|
2
2
|
import { RadioButton as g } from "primevue";
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { _ as y } from "../AmText.vue_vue_type_script_setup_true_lang-yjw50cPR.js";
|
|
4
|
+
import { _ as B } from "../AmIcon.vue_vue_type_script_setup_true_lang-DkJ2sUVG.js";
|
|
5
|
+
import { _ as N } from "../AmHelper.vue_vue_type_script_setup_true_lang-BYQT8u4W.js";
|
|
6
|
+
import { _ as P } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const T = { class: "space-y-2 am-radio-options" }, C = ["data-test", "for"], I = { class: "flex items-center justify-center relative" }, M = { name: "AmRadios" }, R = /* @__PURE__ */ u({
|
|
8
|
+
...M,
|
|
8
9
|
props: /* @__PURE__ */ p({
|
|
9
10
|
name: {},
|
|
10
11
|
options: {},
|
|
@@ -18,8 +19,8 @@ const P = { class: "space-y-2 am-radio-options" }, T = ["data-test", "for"], B =
|
|
|
18
19
|
modelModifiers: {}
|
|
19
20
|
}),
|
|
20
21
|
emits: ["update:modelValue"],
|
|
21
|
-
setup(
|
|
22
|
-
const n = c(
|
|
22
|
+
setup(m) {
|
|
23
|
+
const n = c(m, "modelValue"), d = {
|
|
23
24
|
box: {
|
|
24
25
|
class: "!rounded-full"
|
|
25
26
|
},
|
|
@@ -27,39 +28,44 @@ const P = { class: "space-y-2 am-radio-options" }, T = ["data-test", "for"], B =
|
|
|
27
28
|
class: "!bg-transparent"
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
|
-
return (e,
|
|
31
|
-
(
|
|
31
|
+
return (e, r) => (o(), s("div", T, [
|
|
32
|
+
(o(!0), s(f, null, _(e.options, (t, a) => (o(), s("label", {
|
|
32
33
|
class: "flex items-center gap-2 pt-2 cursor-pointer",
|
|
33
34
|
key: a,
|
|
34
35
|
"data-test": `${e.dataTestPrefix}-option-${a}`,
|
|
35
36
|
for: `${e.name}-${a + 1}`
|
|
36
37
|
}, [
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
V("div", I, [
|
|
39
|
+
l($(g), {
|
|
39
40
|
modelValue: n.value,
|
|
40
|
-
"onUpdate:modelValue":
|
|
41
|
-
pt:
|
|
41
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => n.value = i),
|
|
42
|
+
pt: d,
|
|
42
43
|
inputId: `${e.name}-${a + 1}`,
|
|
43
44
|
name: e.name,
|
|
44
|
-
value:
|
|
45
|
+
value: t.value,
|
|
45
46
|
"data-test": `${e.dataTestPrefix}-input-${e.name}`
|
|
46
47
|
}, null, 8, ["modelValue", "inputId", "name", "value", "data-test"]),
|
|
47
|
-
|
|
48
|
+
l(B, {
|
|
48
49
|
class: "am-radio-options__icon absolute",
|
|
49
50
|
icon: "check",
|
|
50
51
|
size: "md"
|
|
51
52
|
})
|
|
52
53
|
]),
|
|
53
|
-
|
|
54
|
-
default:
|
|
55
|
-
b(
|
|
54
|
+
l(y, { as: "span" }, {
|
|
55
|
+
default: v(() => [
|
|
56
|
+
h(b(t.label), 1)
|
|
56
57
|
]),
|
|
57
58
|
_: 2
|
|
58
|
-
}, 1024)
|
|
59
|
-
|
|
59
|
+
}, 1024),
|
|
60
|
+
t.help ? (o(), k(N, {
|
|
61
|
+
key: 0,
|
|
62
|
+
text: t.help,
|
|
63
|
+
size: "sm"
|
|
64
|
+
}, null, 8, ["text"])) : x("", !0)
|
|
65
|
+
], 8, C))), 128))
|
|
60
66
|
]));
|
|
61
67
|
}
|
|
62
|
-
}),
|
|
68
|
+
}), F = /* @__PURE__ */ P(R, [["__scopeId", "data-v-242f582a"]]);
|
|
63
69
|
export {
|
|
64
|
-
|
|
70
|
+
F as default
|
|
65
71
|
};
|