@vergelijkdirect/comparison-forms 2.0.2-rc.0 → 2.1.0-ver-9053.0

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 (77) hide show
  1. package/README.md +5 -5
  2. package/dist/vue/VdInput-CRb-iTiH.js +145 -0
  3. package/dist/vue/VdPopover-B78nVpNU.js +200 -0
  4. package/dist/vue/VdRadioGroup-D5kHcpsY.js +166 -0
  5. package/dist/vue/VdSearchableSelect-THqVGo_Q.js +209 -0
  6. package/dist/vue/VdSelect-Dv35x4sz.js +112 -0
  7. package/dist/vue/bike-BmAOIT7K.js +2 -0
  8. package/dist/vue/bike.presenter-B28PW7O5.js +1673 -0
  9. package/dist/vue/birthdate.schema-DX1aYftY.js +91 -0
  10. package/dist/vue/businessCar.presenter-DR-Ozf6B.js +121 -0
  11. package/dist/vue/businessLiability-w4xhGnik.js +2 -0
  12. package/dist/vue/businessLiability.presenter-8iyRbLgw.js +80 -0
  13. package/dist/vue/car-business-DMYPV4UK.js +2 -0
  14. package/dist/vue/car-pxn56jlK.js +2 -0
  15. package/dist/vue/car.presenter-CMGN_MtF.js +130 -0
  16. package/dist/vue/caravan-CuhGro4y.js +2 -0
  17. package/dist/vue/caravan.presenter-DCV4ltB7.js +157 -0
  18. package/dist/vue/company.schema-DStHJpGH.js +241 -0
  19. package/dist/vue/comparison-forms.d.ts +36 -35
  20. package/dist/vue/comparison-forms.js +119 -5590
  21. package/dist/vue/date.util-DjJZwKvn.js +24 -0
  22. package/dist/vue/familyComposition.enum-D26VYo_a.js +6 -0
  23. package/dist/vue/familyComposition.schema-A9W0CwZq.js +75 -0
  24. package/dist/vue/house-DJhbPxyX.js +2 -0
  25. package/dist/vue/house.presenter-C7k4TwbP.js +118 -0
  26. package/dist/vue/houseOwnedBuilding.model-DskEdrSG.js +14 -0
  27. package/dist/vue/itc-KSDsJZsI.js +10 -0
  28. package/dist/vue/legal-Ce2WzBp6.js +2 -0
  29. package/dist/vue/legal.presenter-Ddiovxkq.js +175 -0
  30. package/dist/vue/liability-NHH24ecQ.js +2 -0
  31. package/dist/vue/liability.presenter-gHGQxRPP.js +110 -0
  32. package/dist/vue/loan-C9dmM3Vm.js +2 -0
  33. package/dist/vue/loan.presenter-p24T0XvQ.js +198 -0
  34. package/dist/vue/messages-DfcG9Qfd.js +41 -0
  35. package/dist/vue/moped-CnYiLYBp.js +2 -0
  36. package/dist/vue/moped.presenter-C5TcsOIe.js +133 -0
  37. package/dist/vue/motor-DSFijIK7.js +2 -0
  38. package/dist/vue/motor.presenter-Chlott4j.js +130 -0
  39. package/dist/vue/package-TSBIFNzu.js +2 -0
  40. package/dist/vue/package.presenter-Bit_w4np.js +137 -0
  41. package/dist/vue/pet-DRap9f-q.js +2 -0
  42. package/dist/vue/pet.presenter-BrWNvh7j.js +170 -0
  43. package/dist/vue/rules-3BZkSj_K.js +13 -0
  44. package/dist/vue/travel-DB9sfL8A.js +2 -0
  45. package/dist/vue/travel.presenter-CVkNDJwI.js +108 -0
  46. package/dist/vue/useAddress-C-h1pGI5.js +245 -0
  47. package/dist/vue/useLicensePlate-wAVrX9tr.js +187 -0
  48. package/dist/vue/useValidator-B8ZuqyvJ.js +535 -0
  49. package/dist/vue/yesNo-BvJlCm7Y.js +6 -0
  50. package/dist/wc/comparison-forms.js +14922 -14424
  51. package/dist/wc-forms/bike.cjs +1 -1
  52. package/dist/wc-forms/{birthdate.schema-rpmbSDZH.cjs → birthdate.schema-C-y732mA.cjs} +1 -1
  53. package/dist/wc-forms/car.cjs +1 -1
  54. package/dist/wc-forms/caravan.cjs +1 -1
  55. package/dist/wc-forms/{familyComposition.schema-DW6scNvt.cjs → familyComposition.schema-gvSnx-ea.cjs} +1 -1
  56. package/dist/wc-forms/house.cjs +1 -1
  57. package/dist/wc-forms/houseOwnedBuilding.model-G9AqKTZo.cjs +1 -0
  58. package/dist/wc-forms/legal.cjs +1 -1
  59. package/dist/wc-forms/liability.cjs +1 -1
  60. package/dist/wc-forms/loan.cjs +1 -1
  61. package/dist/wc-forms/{messages-stJTqN-x.cjs → messages-CX8jVyEo.cjs} +1 -1
  62. package/dist/wc-forms/moped.cjs +1 -1
  63. package/dist/wc-forms/motor.cjs +1 -1
  64. package/dist/wc-forms/package.cjs +1 -1
  65. package/dist/wc-forms/pet.cjs +1 -1
  66. package/dist/wc-forms/travel.cjs +1 -1
  67. package/dist/wc-noitc/comparison-forms.umd.cjs +3 -3
  68. package/package.json +1 -1
  69. package/dist/client/.vite/ssr-manifest.json +0 -600
  70. package/dist/client/assets/index-6Enzr9rU.css +0 -4
  71. package/dist/client/assets/index-6Enzr9rU.css.br +0 -0
  72. package/dist/client/assets/index-DUchBxEo.js +0 -57
  73. package/dist/client/assets/index-DUchBxEo.js.br +0 -0
  74. package/dist/client/index.html +0 -15
  75. package/dist/server/entry-server.js +0 -9981
  76. package/dist/server/entry-server.js.br +0 -0
  77. package/dist/wc-forms/houseOwnedBuilding.model-DgIQ2pQN.cjs +0 -1
package/README.md CHANGED
@@ -33,12 +33,12 @@ import '@vergelijkdirect/comparison-forms/vue/styles';
33
33
 
34
34
  ```vue
35
35
  <script setup>
36
- import { ComparisonFormFlow } from '@vergelijkdirect/comparison-forms/vue';
36
+ import { VdComparisonForm } from '@vergelijkdirect/comparison-forms/vue';
37
37
  // ITC must already be initialized (see "Install & prerequisites" above)
38
38
  </script>
39
39
 
40
40
  <template>
41
- <ComparisonFormFlow
41
+ <VdComparisonForm
42
42
  form="bike"
43
43
  link="https://www.vergelijkdirect.com/fietsverzekering/"
44
44
  layout="horizontal"
@@ -58,7 +58,7 @@ yours to wire, with the user's data available in `payload.user`.
58
58
  ```vue
59
59
  <script setup>
60
60
  import {
61
- BikeForm,
61
+ VdBikeForm,
62
62
  bikePresenter,
63
63
  useComparisonSubmit,
64
64
  } from '@vergelijkdirect/comparison-forms/vue';
@@ -70,14 +70,14 @@ const { submit, isSubmitting } = useComparisonSubmit({
70
70
  </script>
71
71
 
72
72
  <template>
73
- <BikeForm @submitted="(data) => submit(bikePresenter(data))" />
73
+ <VdBikeForm @submitted="(data) => submit(bikePresenter(data))" />
74
74
  </template>
75
75
  ```
76
76
 
77
77
  Or skip the flow entirely (result-page edit, custom persistence):
78
78
 
79
79
  ```vue
80
- <BikeForm :initial-data="savedBike" @submitted="updateMyComparison" />
80
+ <VdBikeForm :initial-data="savedBike" @submitted="updateMyComparison" />
81
81
  ```
82
82
 
83
83
  `initialData` is read once on mount — remount with `:key` when it arrives async.
@@ -0,0 +1,145 @@
1
+ import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, defineComponent as o, mergeModels as s, normalizeClass as c, openBlock as l, renderSlot as u, toDisplayString as d, unref as f, useId as p, useModel as m, useSlots as h, withCtx as g, withDirectives as _, withModifiers as v } from "vue";
2
+ import { vMaska as y } from "maska/vue";
3
+ import { Label as b } from "reka-ui";
4
+ //#region src/components/ui/VdInput.vue?vue&type=script&setup=true&lang.ts
5
+ var x = { class: "vd-field" }, S = {
6
+ key: 0,
7
+ class: "vd-field__asterisk"
8
+ }, C = {
9
+ key: 1,
10
+ class: "vd-field__popover"
11
+ }, w = [
12
+ "id",
13
+ "value",
14
+ "type",
15
+ "name",
16
+ "inputmode",
17
+ "placeholder",
18
+ "disabled",
19
+ "readonly",
20
+ "autocomplete"
21
+ ], T = {
22
+ key: 0,
23
+ class: "vd-field__icon-and-loader"
24
+ }, E = {
25
+ key: 0,
26
+ class: "vd-field__icon vd-field__icon--with-loader"
27
+ }, D = { key: 1 }, O = {
28
+ key: 0,
29
+ class: "vd-field__loader-circle"
30
+ }, k = {
31
+ key: 0,
32
+ class: "vd-field__message vd-field__message--error"
33
+ }, A = {
34
+ key: 1,
35
+ class: "vd-field__message vd-field__message--information"
36
+ }, j = /* @__PURE__ */ o({
37
+ __name: "VdInput",
38
+ props: /*@__PURE__*/ s({
39
+ id: { default: null },
40
+ name: {},
41
+ type: { default: "text" },
42
+ label: { default: "" },
43
+ placeholder: { default: "" },
44
+ errorMessage: { default: null },
45
+ disabled: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ readonly: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ required: {
54
+ type: Boolean,
55
+ default: !0
56
+ },
57
+ verified: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ mask: { default: "" },
62
+ autocomplete: {
63
+ type: Boolean,
64
+ default: !1
65
+ },
66
+ infoMessage: { default: "" },
67
+ icon: { default: "" },
68
+ iconLeft: {
69
+ type: Boolean,
70
+ default: !1
71
+ },
72
+ capitalize: {
73
+ type: Boolean,
74
+ default: !1
75
+ },
76
+ hasError: {
77
+ type: [Boolean, null],
78
+ default: null
79
+ },
80
+ loading: {
81
+ type: Boolean,
82
+ default: !1
83
+ },
84
+ inputmode: { default: void 0 }
85
+ }, {
86
+ modelValue: { required: !0 },
87
+ modelModifiers: {}
88
+ }),
89
+ emits: /*@__PURE__*/ s(["blur", "change"], ["update:modelValue"]),
90
+ setup(o, { emit: s }) {
91
+ let j = o, M = m(o, "modelValue"), N = s, P = h(), F = j.id ?? p(), I = (e) => j.capitalize ? e.toUpperCase() : e, L = e(() => !j.errorMessage && !j.verified && !j.hasError), R = e(() => !!M.value && !j.errorMessage && j.verified && !j.hasError && !j.loading), z = e(() => !!j.errorMessage || !!j.hasError), B = e(() => !!j.errorMessage || !!P.errorMessage), V = (e) => {
92
+ M.value = I(e.target.value);
93
+ }, H = (e) => {
94
+ N("blur", I(e.target.value));
95
+ }, U = (e) => {
96
+ N("change", I(e.target.value));
97
+ };
98
+ return (e, s) => (l(), r("div", x, [
99
+ i("div", {
100
+ class: c(["vd-field__label-wrapper", { "vd-field__label-wrapper--disabled": o.disabled }]),
101
+ onClick: s[0] ||= v(() => {}, ["prevent"])
102
+ }, [o.label || f(P).label ? (l(), t(f(b), {
103
+ key: 0,
104
+ for: f(F),
105
+ class: "vd-field__label"
106
+ }, {
107
+ default: g(() => [i("span", null, [u(e.$slots, "label", {}, () => [a(d(o.label), 1)]), o.required ? (l(), r("span", S, "*")) : n("", !0)])]),
108
+ _: 3
109
+ }, 8, ["for"])) : n("", !0), f(P).popover ? (l(), r("span", C, [u(e.$slots, "popover")])) : n("", !0)], 2),
110
+ i("div", { class: c(["vd-field__wrapper", { "vd-field__wrapper-checkmark": R.value && !(o.icon || f(P).icon) }]) }, [_(i("input", {
111
+ id: f(F),
112
+ value: M.value,
113
+ type: o.type,
114
+ name: o.name,
115
+ inputmode: o.inputmode,
116
+ placeholder: o.placeholder,
117
+ disabled: o.disabled,
118
+ readonly: o.readonly,
119
+ autocomplete: o.autocomplete ? "off" : "on",
120
+ class: c(["vd-field__input", {
121
+ "vd-field__input--verified": R.value,
122
+ "vd-field__input--default": L.value,
123
+ "vd-field__input--error": z.value,
124
+ "vd-field__input--icon-left": (o.icon || f(P).icon) && o.iconLeft,
125
+ "vd-field__input--icon-right": (o.icon || f(P).icon) && !o.iconLeft,
126
+ "vd-field__input--loading": o.loading,
127
+ "vd-field__input--loading vd-field__input--icon": o.loading && !o.iconLeft && (o.icon || f(P).icon)
128
+ }]),
129
+ onInput: V,
130
+ onChange: U,
131
+ onBlur: H
132
+ }, null, 42, w), [[f(y), o.mask || void 0]]), o.loading && o.icon && !o.iconLeft ? (l(), r("div", T, [s[1] ||= i("div", { class: "vd-field__loader-circle vd-field__loader-circle--and-icon" }, null, -1), o.icon || f(P).icon ? (l(), r("span", E, [u(e.$slots, "icon", {}, () => [i("i", { class: c(o.icon) }, null, 2)])])) : n("", !0)])) : (l(), r("div", D, [o.loading ? (l(), r("div", O)) : n("", !0), o.icon || f(P).icon ? (l(), r("span", {
133
+ key: 1,
134
+ class: c(["vd-field__icon", {
135
+ "vd-field__icon--left": o.iconLeft,
136
+ "vd-field__icon--disabled": o.disabled
137
+ }])
138
+ }, [u(e.$slots, "icon", {}, () => [i("i", { class: c(o.icon) }, null, 2)])], 2)) : n("", !0)]))], 2),
139
+ B.value || f(P).errorMessage ? (l(), r("div", k, [u(e.$slots, "errorMessage", {}, () => [s[2] ||= i("i", { class: "fas fa-exclamation-circle vd-field__message-icon" }, null, -1), a(" " + d(o.errorMessage), 1)])])) : n("", !0),
140
+ o.infoMessage || f(P).information ? (l(), r("div", A, [u(e.$slots, "information", {}, () => [s[3] ||= i("i", { class: "fas fa-info-circle vd-field__message-icon" }, null, -1), a(" " + d(o.infoMessage), 1)])])) : n("", !0)
141
+ ]));
142
+ }
143
+ });
144
+ //#endregion
145
+ export { j as t };
@@ -0,0 +1,200 @@
1
+ import { createBlock as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, createVNode as i, defineComponent as a, normalizeClass as o, normalizeStyle as s, openBlock as c, ref as l, renderSlot as u, toDisplayString as d, unref as f, withModifiers as p } from "vue";
2
+ import { autoUpdate as m, flip as h, offset as g, shift as _, useFloating as v } from "@floating-ui/vue";
3
+ //#region src/components/ui/popover/VdPopoverHeader.vue?vue&type=script&setup=true&lang.ts
4
+ var y = { class: "vd-popover__title" }, b = {
5
+ key: 0,
6
+ class: "vd-popover__title-icon"
7
+ }, x = { key: 1 }, S = /* @__PURE__ */ a({
8
+ __name: "VdPopoverHeader",
9
+ props: {
10
+ title: { default: "" },
11
+ icon: { default: "" }
12
+ },
13
+ emits: ["close"],
14
+ setup(e, { emit: i }) {
15
+ let a = i, s = () => {
16
+ a("close");
17
+ };
18
+ return (i, a) => (c(), n("div", { class: o(["vd-popover__header", { "vd-popover__header--only-close-icon": !e.title }]) }, [e.title ? u(i.$slots, "default", { key: 0 }, () => [r("div", y, [e.icon ? (c(), n("div", b, [r("i", { class: o(e.icon) }, null, 2)])) : t("", !0), e.title ? (c(), n("span", x, d(e.title), 1)) : t("", !0)])]) : t("", !0), r("button", {
19
+ class: "vd-popover__close-btn",
20
+ onClick: s
21
+ }, [...a[0] ||= [r("i", { class: "far fa-times vd-popover__close-btn-icon" }, null, -1)]])], 2));
22
+ }
23
+ }), C = ["innerHTML"], w = /* @__PURE__ */ a({
24
+ __name: "VdPopoverTooltip",
25
+ props: {
26
+ content: { default: () => ({
27
+ title: "",
28
+ description: ""
29
+ }) },
30
+ variant: { default: void 0 },
31
+ size: { default: void 0 },
32
+ hideHeaderTooltip: {
33
+ type: Boolean,
34
+ default: !1
35
+ },
36
+ headerIconTooltip: { default: "" }
37
+ },
38
+ emits: ["close"],
39
+ setup(r, { emit: i }) {
40
+ let a = i, s = () => {
41
+ a("close");
42
+ };
43
+ return (i, a) => (c(), n("div", {
44
+ class: o(["vd-popover__tooltip", [r.size ? `vd-popover__tooltip--${r.size}` : "", r.variant ? `vd-popover__tooltip--${r.variant}` : ""]]),
45
+ onPointerdown: a[0] ||= p(() => {}, ["prevent"])
46
+ }, [r.hideHeaderTooltip ? t("", !0) : (c(), e(S, {
47
+ key: 0,
48
+ title: r.content.title,
49
+ icon: r.headerIconTooltip,
50
+ onClose: s
51
+ }, null, 8, ["title", "icon"])), r.content && r.content.description ? (c(), n("p", {
52
+ key: 1,
53
+ class: "vd-popover__description",
54
+ innerHTML: r.content.description
55
+ }, null, 8, C)) : t("", !0)], 34));
56
+ }
57
+ }), T = { key: 1 }, E = /* @__PURE__ */ a({
58
+ __name: "VdPopoverReference",
59
+ props: {
60
+ label: { default: "" },
61
+ icon: { default: "fas fa-info-circle" },
62
+ variant: { default: void 0 },
63
+ iconLeft: {
64
+ type: Boolean,
65
+ default: !1
66
+ }
67
+ },
68
+ setup(e) {
69
+ return (r, i) => (c(), n("span", { class: o(["vd-popover__reference", [e.variant ? `vd-popover__reference--${e.variant}` : ""]]) }, [
70
+ e.iconLeft ? (c(), n("i", {
71
+ key: 0,
72
+ class: o(e.icon)
73
+ }, null, 2)) : t("", !0),
74
+ e.label ? (c(), n("span", T, d(e.label), 1)) : t("", !0),
75
+ e.iconLeft ? t("", !0) : (c(), n("i", {
76
+ key: 2,
77
+ class: o(e.icon)
78
+ }, null, 2))
79
+ ], 2));
80
+ }
81
+ }), D = /* @__PURE__ */ a({
82
+ __name: "VdPopover",
83
+ props: {
84
+ label: { default: "" },
85
+ iconRef: { default: "fas fa-info-circle" },
86
+ refVariant: { default: void 0 },
87
+ iconLeftRef: {
88
+ type: Boolean,
89
+ default: !1
90
+ },
91
+ offSet: { default: 8 },
92
+ content: { default: () => ({
93
+ title: "",
94
+ description: ""
95
+ }) },
96
+ tooltipVariant: { default: void 0 },
97
+ tooltipSize: { default: void 0 },
98
+ hideHeaderTooltip: {
99
+ type: Boolean,
100
+ default: !1
101
+ },
102
+ headerIconTooltip: { default: "fas fa-info-circle" },
103
+ fixed: {
104
+ type: Boolean,
105
+ default: !1
106
+ },
107
+ display: { default: "inline-block" },
108
+ position: { default: "top-start" },
109
+ disableHoverListener: {
110
+ type: Boolean,
111
+ default: !1
112
+ },
113
+ disableClickListener: {
114
+ type: Boolean,
115
+ default: !1
116
+ },
117
+ mousedownListener: {
118
+ type: Boolean,
119
+ default: !1
120
+ },
121
+ fullWidth: {
122
+ type: Boolean,
123
+ default: !1
124
+ }
125
+ },
126
+ setup(e) {
127
+ let a = e, d = l(null), y = l(null), { floatingStyles: b } = v(d, y, {
128
+ placement: a.position,
129
+ middleware: [
130
+ g(a.offSet),
131
+ h({ mainAxis: !a.fixed }),
132
+ _({
133
+ crossAxis: !1,
134
+ padding: 10
135
+ })
136
+ ],
137
+ whileElementsMounted: m
138
+ }), x = l(!1), S = l(!1), C = () => {
139
+ x.value = !0, S.value = !0;
140
+ }, T = () => {
141
+ x.value = !1, S.value = !1;
142
+ }, D = () => {
143
+ a.disableClickListener || a.mousedownListener || (S.value ? T() : C());
144
+ }, O = () => {
145
+ a.mousedownListener && (x.value ? T() : C());
146
+ }, k = () => {
147
+ a.disableHoverListener || (x.value = !0);
148
+ }, A = () => {
149
+ a.disableHoverListener || S.value || (x.value = !1);
150
+ };
151
+ return (l, m) => (c(), n("span", { class: o(["vd-popover", `vd-popover--${e.display}`]) }, [r("span", {
152
+ ref_key: "reference",
153
+ ref: d,
154
+ class: "vd-popover__reference-wrapper",
155
+ onClick: p(D, ["stop"]),
156
+ onMouseover: k,
157
+ onMouseleave: A,
158
+ onMousedown: O
159
+ }, [u(l.$slots, "reference", {
160
+ toggleOnClick: D,
161
+ onHover: k,
162
+ onLeave: A,
163
+ onMousedown: O,
164
+ isOpen: x.value,
165
+ close: T
166
+ }, () => [i(E, {
167
+ variant: e.refVariant,
168
+ label: e.label,
169
+ icon: e.iconRef,
170
+ "icon-left": e.iconLeftRef
171
+ }, null, 8, [
172
+ "variant",
173
+ "label",
174
+ "icon",
175
+ "icon-left"
176
+ ])])], 544), x.value ? (c(), n("div", {
177
+ key: 0,
178
+ ref_key: "floating",
179
+ ref: y,
180
+ style: s(f(b)),
181
+ class: o(["vd-popover__floating", a.fullWidth ? "vd-popover__floating--full-width" : ""]),
182
+ onPointerdown: m[0] ||= p(() => {}, ["prevent"])
183
+ }, [u(l.$slots, "tooltip", { close: T }, () => [i(w, {
184
+ content: e.content,
185
+ variant: e.tooltipVariant,
186
+ size: e.tooltipSize,
187
+ "hide-header-tooltip": e.hideHeaderTooltip,
188
+ "header-icon-tooltip": e.headerIconTooltip,
189
+ onClose: T
190
+ }, null, 8, [
191
+ "content",
192
+ "variant",
193
+ "size",
194
+ "hide-header-tooltip",
195
+ "header-icon-tooltip"
196
+ ])])], 38)) : t("", !0)], 2));
197
+ }
198
+ });
199
+ //#endregion
200
+ export { D as t };
@@ -0,0 +1,166 @@
1
+ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, mergeModels as c, normalizeClass as l, openBlock as u, renderList as d, renderSlot as f, toDisplayString as p, unref as m, useId as h, useModel as g, useSlots as _, vModelRadio as v, withCtx as y, withDirectives as b } from "vue";
2
+ //#region src/components/ui/VdRadio.vue?vue&type=script&setup=true&lang.ts
3
+ var x = { class: "vd-radio-field" }, S = { class: "vd-radio-field__input" }, C = [
4
+ "id",
5
+ "disabled",
6
+ "name",
7
+ "value"
8
+ ], w = ["for"], T = /* @__PURE__ */ s({
9
+ __name: "VdRadio",
10
+ props: /*@__PURE__*/ c({
11
+ name: {},
12
+ value: {
13
+ type: [
14
+ String,
15
+ Number,
16
+ Boolean,
17
+ null
18
+ ],
19
+ default: null
20
+ },
21
+ id: { default: null },
22
+ label: { default: "" },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: !1
26
+ },
27
+ invalid: {
28
+ type: Boolean,
29
+ default: !1
30
+ },
31
+ green: {
32
+ type: Boolean,
33
+ default: !1
34
+ }
35
+ }, {
36
+ modelValue: {
37
+ type: [
38
+ String,
39
+ Number,
40
+ Boolean,
41
+ null
42
+ ],
43
+ default: null
44
+ },
45
+ modelModifiers: {}
46
+ }),
47
+ emits: /*@__PURE__*/ c(["change", "blur"], ["update:modelValue"]),
48
+ setup(e, { emit: t }) {
49
+ let n = e, s = g(e, "modelValue"), c = t, d = _(), y = n.id ?? h(), T = (e) => {
50
+ c("change", n.value, e.target.value);
51
+ }, E = (e) => {
52
+ c("blur", n.value, e.target.value);
53
+ };
54
+ return (t, n) => (u(), i("div", x, [
55
+ a("div", S, [b(a("input", {
56
+ id: m(y),
57
+ "onUpdate:modelValue": n[0] ||= (e) => s.value = e,
58
+ disabled: e.disabled,
59
+ name: e.name,
60
+ value: e.value,
61
+ class: l(["vd-radio", {
62
+ "vd-radio--error": e.invalid,
63
+ "vd-radio--green": e.green
64
+ }]),
65
+ type: "radio",
66
+ onChange: T,
67
+ onBlur: E
68
+ }, null, 42, C), [[v, s.value]])]),
69
+ e.label || m(d).label ? (u(), i("label", {
70
+ key: 0,
71
+ class: "vd-radio-field__label",
72
+ for: m(y)
73
+ }, [f(t.$slots, "label", {}, () => [o(p(e.label), 1)])], 8, w)) : r("", !0),
74
+ f(t.$slots, "popover")
75
+ ]));
76
+ }
77
+ }), E = ["disabled"], D = { class: "vd-field__label" }, O = {
78
+ key: 0,
79
+ class: "vd-field__asterisk"
80
+ }, k = {
81
+ key: 0,
82
+ class: "vd-field__popover"
83
+ }, A = {
84
+ key: 1,
85
+ class: "vd-field__message vd-field__message--error"
86
+ }, j = {
87
+ key: 2,
88
+ class: "vd-field__message vd-field__message--information"
89
+ }, M = /* @__PURE__ */ s({
90
+ __name: "VdRadioGroup",
91
+ props: /*@__PURE__*/ c({
92
+ name: {},
93
+ options: {},
94
+ legend: { default: "" },
95
+ errorMessage: { default: null },
96
+ infoMessage: { default: null },
97
+ disabled: {
98
+ type: Boolean,
99
+ default: !1
100
+ },
101
+ required: {
102
+ type: Boolean,
103
+ default: !0
104
+ },
105
+ variant: { default: "default" },
106
+ groupClass: { default: void 0 }
107
+ }, {
108
+ modelValue: {
109
+ type: [
110
+ String,
111
+ Number,
112
+ Boolean,
113
+ null
114
+ ],
115
+ required: !0
116
+ },
117
+ modelModifiers: {}
118
+ }),
119
+ emits: /*@__PURE__*/ c(["change", "blur"], ["update:modelValue"]),
120
+ setup(s, { emit: c }) {
121
+ let h = s, v = g(s, "modelValue"), b = c, x = _(), S = t(() => !!h.errorMessage), C = t(() => ({
122
+ "vd-radio-group--horizontal": h.variant === "horizontal",
123
+ "vd-radio-group--boxed": h.variant === "boxed"
124
+ })), w = (e) => {
125
+ b("change", e);
126
+ }, M = (e) => {
127
+ b("blur", e);
128
+ };
129
+ return (t, c) => (u(), i("fieldset", {
130
+ class: l(["vd-field vd-radio-group", C.value]),
131
+ disabled: s.disabled
132
+ }, [
133
+ s.legend || m(x).legend ? (u(), i("legend", {
134
+ key: 0,
135
+ class: l(["vd-field__label-wrapper", { "vd-field__label-wrapper--disabled": s.disabled }])
136
+ }, [a("div", D, [f(t.$slots, "legend", {}, () => [o(p(s.legend), 1)]), s.required ? (u(), i("span", O, "*")) : r("", !0)]), m(x).popover ? (u(), i("span", k, [f(t.$slots, "popover")])) : r("", !0)], 2)) : r("", !0),
137
+ a("div", { class: l(["vd-radio-group__list", s.groupClass]) }, [(u(!0), i(e, null, d(s.options, (e) => (u(), n(T, {
138
+ key: e.value,
139
+ modelValue: v.value,
140
+ "onUpdate:modelValue": c[0] ||= (e) => v.value = e,
141
+ value: e.value,
142
+ label: e.label,
143
+ name: s.name,
144
+ disabled: e.disabled,
145
+ invalid: S.value,
146
+ onChange: w,
147
+ onBlur: M
148
+ }, {
149
+ label: y(() => [f(t.$slots, "label", { option: e })]),
150
+ popover: y(() => [f(t.$slots, "label_popover", { option: e })]),
151
+ _: 2
152
+ }, 1032, [
153
+ "modelValue",
154
+ "value",
155
+ "label",
156
+ "name",
157
+ "disabled",
158
+ "invalid"
159
+ ]))), 128))], 2),
160
+ S.value ? (u(), i("div", A, [c[1] ||= a("i", { class: "fas fa-exclamation-circle vd-field__message-icon" }, null, -1), o(" " + p(s.errorMessage), 1)])) : r("", !0),
161
+ s.infoMessage || m(x).information ? (u(), i("div", j, [f(t.$slots, "information", {}, () => [c[2] ||= a("i", { class: "fas fa-info-circle vd-field__message-icon" }, null, -1), o(" " + p(s.infoMessage), 1)])])) : r("", !0)
162
+ ], 10, E));
163
+ }
164
+ });
165
+ //#endregion
166
+ export { M as t };